App-Chart

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN



# Maybe some of this would be under develop=>
# maximum_devel =>
# { description => 'Stuff used variously for development.',
#   requires => { 'Business::ISIN'     => 0,
#                 'Devel::FindRef'     => 0,
#                 'warnings::unused'   => 0,
#                 'Math::Polynomial'         => '1.00',
#                 'Math::Polynomial::Horner' => 0,
#                 'Devel::StackTrace'  => '1.19',
#                 'Module::Depends::Intrusive' => 0,
#                 'Module::ScanDeps'   => 0,
#                 'Module::ExtractUse' => 0,
#                 'Lisp::Reader'       => 0,
#                 'Parse::DebControl'  => 0,
#                 'lib::abs'           => 0,
#                 'File::chdir'        => 0,
#                 'Pod::Strip'         => 0,
#                 'Finance::Quote'     => 0,
#               } },

#------------------------------------------------------------------------------
package MY;
sub postamble {
  my ($makemaker) = @_;

  # FIXME: $(filter-out) is a GNU-ism ...
  $makemaker->{'MyMakeMakerExtras_LINT_FILES'}
    = '$(filter-out %/COPYING %.bash %.desktop %.html %.mo %.xpm, $(TO_INST_PM))'
      . ' chart t/*.t devel/*.pl examples/*.pl';

  $makemaker->{'PO_DOMAIN'} = 'App-Chart';

  my $ret = MyMakeMakerGettext::postamble($makemaker);

  $ret .= <<'HERE';

#------------------------------------------------------------------------------
# IndicatorModelGenerated.pm

lib/App/Chart/Gtk2/IndicatorModelGenerated.pm: devel/generate-indicator-model.pl lib/App/Chart/Series/Derived/*.pm
	$(PERL) -I lib devel/generate-indicator-model.pl \
	  >lib/App/Chart/Gtk2/IndicatorModelGenerated.pm \
	|| (rm -f lib/App/Chart/Gtk2/IndicatorModelGenerated.pm; false)

#------------------------------------------------------------------------------
# chart.desktop

# Just chucked under lib/App/Chart for now ...
# eg. /usr/share/applications, for .desktop files
# APPLICATIONSDIR = $(PREFIX)/share/applications
# doc_install :: chart.desktop
# 	install -d $(DESTDIR)$(APPLICATIONSDIR)
# 	install chart.desktop $(DESTDIR)$(APPLICATIONSDIR)


#------------------------------------------------------------------------------
# doc stuff
#
# doc/*.txt and doc/*.png are left in that directory so
# "M-x makeinfo-buffer" can be used during development.  They're excluded
# from the dist by MANIFEST.SKIP.  The *.png are copied to lib/App/Chart/doc
# for the dist.

# Depend only on the generator program doc/weights.pl since the .txt and
# .png are not in the doc directory of the dist.
HTML_TEXI_DEPS = \
  doc/chart.texi doc/version.texi doc/weights.pl

doc: lib/App/Chart/doc/chart.html doc/chart.omf

lib/App/Chart/doc/chart.html: $(HTML_TEXI_DEPS) doc/mung-html.pl
	make doc/chart-ema-weights.txt doc/chart-ema-weights.png # which builds others too
	cd doc && makeinfo --html --no-split chart.texi
	mkdir -p lib/App/Chart/doc
	mv doc/chart.html lib/App/Chart/doc/chart.html
	cp doc/*.png lib/App/Chart/doc
	cd lib/App/Chart/doc && $(PERL) ../../../../doc/mung-html.pl chart.html

doc/version.texi doc/chart.omf: doc/chart.texi
	echo '@c  Generated by top-level Makefile, DO NOT EDIT' >doc/version.texi
	echo '@set VERSION $(VERSION)' >>doc/version.texi
	echo '@set EDITION $(VERSION)' >>doc/version.texi
	echo '@set UPDATED '`date '+%d %B %Y'` >>doc/version.texi
	echo '@set UPDATED_MONTH '`date '+%B %Y'` >>doc/version.texi
	cd doc && perl -pi \
	  -e 's{version identifier="[^"]*"}{version identifier="$(VERSION)"};' \
	  -e 's{date="[^"]*"}{date="'`date +%Y-%m-%d`'"};' \
	  -e 's{<date>[^<]*</date>}{<date>'`date +%Y-%m-%d`'</date>};' \
	  chart.omf

info: doc/chart.info
doc/chart.info: doc/chart.texi doc/version.texi doc/chart-ema-weights.txt doc/chart-ema-weights.png
	cd doc && makeinfo chart.texi

TEXI2DVI = texi2dvi
dvi: doc/chart.dvi
doc/chart.dvi: doc/chart.texi doc/version.texi doc/chart-ema-weights.eps
	cd doc && $(TEXI2DVI) chart.texi

DVIPS = dvips
ps: doc/chart.ps
doc/chart.ps: doc/chart.dvi
	cd doc && $(DVIPS) -o chart.ps chart.dvi

TEXI2PDF = texi2pdf
pdf: doc/chart.pdf
doc/chart.pdf: doc/chart.texi doc/version.texi doc/chart-ema-weights.pdf
	cd doc && $(TEXI2PDF) chart.texi

WEIGHTS_SOURCES = \
  doc/weights.pl \
  lib/App/Chart/Series/Derived/DEMA.pm \
  lib/App/Chart/Series/Derived/EMA.pm \
  lib/App/Chart/Series/Derived/EPMA.pm \
  lib/App/Chart/Series/Derived/HullMA.pm \
  lib/App/Chart/Series/Derived/LaguerreFilter.pm \
  lib/App/Chart/Series/Derived/SMA.pm \
  lib/App/Chart/Series/Derived/REMA.pm \
  lib/App/Chart/Series/Derived/SineMA.pm \
  lib/App/Chart/Series/Derived/T3.pm \
  lib/App/Chart/Series/Derived/TMA.pm \
  lib/App/Chart/Series/Derived/TEMA.pm \
  lib/App/Chart/Series/Derived/WMA.pm \
  lib/App/Chart/Series/Derived/ZLEMA.pm

doc/chart-ema-weights.txt doc/chart-ema-weights.png: $(WEIGHTS_SOURCES)
	cd doc && $(PERL) -I ../lib weights.pl

doc/chart-ema-weights.eps: $(WEIGHTS_SOURCES)
	cd doc && $(PERL) -I ../lib weights.pl --eps
# "epstopdf" is from tetex or texlive
#   (debian package texlive-font-utils or previously texlive-extra-utils).
# "ps2pdf" is from ghostscript.
EPSTOPDF = epstopdf
PS2PDF = ps2pdf
doc/chart-ema-weights.pdf: doc/chart-ema-weights.eps
	#
	# NOTE: if you have $(PS2PDF) instead of $(EPSTOPDF) then messages like
	#     /bin/sh: $(EPSTOPDF): not found
	# are normal and harmless
	#
	cd doc; for i in chart-*-weights.eps; do \
	  $(EPSTOPDF) $$i || $(PS2PDF) $$i || exit 1; \
	done


html-split: doc/html-split/index.html
doc/html-split/index.html: $(HTML_TEXI_DEPS) doc/mung-html.pl
	rm -rf doc/html-split
	cd doc && makeinfo --html -o html-split chart.texi
	cp doc/*.png doc/html-split
	cd doc/html-split && $(PERL) ../mung-html.pl *.html

HERE
  return $ret;
}

#------------------------------------------------------------------------------
#
# cf
# Hurst.pdf
# Anis and Lloyd
# The expected value of the adjusted rescaled hurst range ...
# nBiometrika 63 1976 111-116



( run in 0.679 second using v1.01-cache-2.11-cpan-df04353d9ac )