in reply to Re^2: Benchmarks target in Makefile
in thread Benchmarks target in Makefile
Based on my reading of ExtUtils::MakeMaker:
postamble: Anything put here will be passed to MY::postamble() if you have one
... and the
start to my function that I linked earlier, I believe that MM passes the hash as args to the subroutine, not as variables in the Makefile, so I would suggest something like (untested):sub MY::postamble { my (undef,%h) = @_; ...
sub MY::postamble { my (undef,%h) = @_; my $ret = "bench :: $h{BENCHMARKS}\n"; $ret .= <<'POSTAMBLE'; $(NOECHO) /usr/bin/env perl '$<' POSTAMBLE return $ret; } WriteMakefile( INSTALL_BASE => blablabla ... postamble => { BENCHMARKS => 'benchmarks/*.b' } );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Benchmarks target in Makefile
by bliako (Abbot) on Jun 19, 2018 at 19:40 UTC |