develooper Front page | perl.perl5.porters | Postings from June 2004

mkheader, perl Makefile

Thread Next
From:
hv
Date:
June 8, 2004 06:18
Subject:
mkheader, perl Makefile
Message ID:
200406081320.i58DKaX23066@zen.crypt.org
My bleadperl build was breaking, and I eventually discovered it was because
'make test' has insufficient dependencies - on a freshly Configured source
tree, it does not run mktables before trying to build Unicode::Normalize.
The 'test' target has a quite complex dependency tree: can it be simplified
by replacing most of the 'test_prep' dependency with a dependency on 'all'?
An alternative might be to make $(dynamic_ext) depend on unidatafiles.

It took me a while to track down the problem, because mkheader is invoked
from the U::N Makefile.PL with C< do 'mkheader'; >, which swallows any error
messages. It would be useful if this could check the return value and print
$@ or $! as appropriate. I think it needs no more than:

  do 'mkheader' or die $@ || "mkheader: $!";

Which would have given me the ugly but helpful:

          Making Unicode::Normalize (dynamic)
  Making header files for XS...
  Unicode::Normalize, mkheader: CombiningClass.pl not found at mkheader line 26
          require mkheader called at Makefile.PL line 8
  Warning: No Makefile!
  make[1]: Entering directory `/src/package/lang/perl/bleadperl/ext/Unicode/Normalize'
  make[1]: *** No rule to make target `config'.  Stop.
  make[1]: Leaving directory `/src/package/lang/perl/bleadperl/ext/Unicode/Normalize'
  make config failed, continuing anyway...
  make[1]: Entering directory `/src/package/lang/perl/bleadperl/ext/Unicode/Normalize'
  make[1]: *** No rule to make target `all'.  Stop.
  make[1]: Leaving directory `/src/package/lang/perl/bleadperl/ext/Unicode/Normalize'
  make: *** [lib/auto/Unicode/Normalize/Normalize.so] Error 2

(I also wonder whether we should be detecting Makefile.PL failure and
giving up slightly more cleanly than that, but that's a lesser problem.)

Hugo

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About