App-Chart

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

         prereqs =>
         { runtime =>
           { requires => { 'Devel::StackTrace' => 0, },
             recommends => {
                            # Devel::StackTrace 1.19 catches bad utf8,
                            # which could be important for tracing.
                            # Though for flexibility the code in
                            # App::Chart::GUI doesn't demand it.
                            'Devel::StackTrace' => '1.19',
                           } } },
       },
       maximum_diagnostics =>
       { description => 'Have as much information as possible in the Help/Diagnostics dialog.',
         prereqs =>
         { runtime =>
           { requires => { 'BSD::Resource' => 0,
                           'Devel::FindBlessedRefs' => 0,
                           'Devel::Mallinfo' => 0,  # mine
                           'Devel::Peek' => 0,
                           'Devel::SawAmpersand' => 0,
                         },
             recommends => {
                            # Devel::Arena 0.23 might not work with perl
                            # 5.20, so have it only as recommends
                            'Devel::Arena' => 0,
                           },
           } },
       },
     },
   },
  );


# 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 \



( run in 1.933 second using v1.01-cache-2.11-cpan-39bf76dae61 )