Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

ethan (3163)

ethan
  reversethis-{ed. ... rap.nov.olissat}

Being a 25-year old chap living in the western-most town of Germany. Stuying communication and information science and being a huge fan of XS-related things.

Journal of ethan (3163)

Thursday January 16, 2003
05:00 PM

Blaming ExtUtils::MakeMaker

[ #10023 ]

Sometimes my own stupidity is hard to bear:

For days I had been fighting with ExtUtils::MakeMaker (admittedly a not so pleasant job). Imagine the scenario: A top-level Makefile.PL and a libdbx/Makefile.PL. To make the whole thing compile on some compilers you need to pass extra flags to perl Makefile.PL. According to the docs, I had to add


        sub MY::pasthru {
                my $self = shift;
                my $ccflags = $self->{CCFLAGS};
                return <<PASTHRU
        PASTHRU = "CCFLAGS=$ccflags"
        PASTHRU
        }

to the end of my top-level Makefile.PL which sounded obvious enough to me. The rule to invoke libdbx/Makefile.PL had to be specified as well. So I added:


        sub MY::postamble {
                '
        $(MYEXTLIB): libdbx/Makefile
                cd libdbx && $(MAKE) $(PASSTHRU)
        ';
        }

And yet, the CCFLAGS never made it to libdbx/Makefile. I checked the generated Makefiles that - according to my knowledge of make - should have done the job just fine...till I finally decided that it'd be more sensible to simply turn mad.

And why did it not work? Well, PASTHRU is not at all the same thing as PASSTHRU. Computers obviously have sharper eyes than humans. After correcting the typo in the above MY::postamble it all worked wonderfully.

However, the people naming this thing PASTHRU must have smoked something. There is no better explanation why they left off the second 'S' (reminds me of umount(8) and the creat() system call, two other crippled imbecilities).

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.