>>>>> "Randal" == Randal L Schwartz <[EMAIL PROTECTED]> writes:
>>>>> "Hugh" == Hugh S Myers <[EMAIL PROTECTED]> writes:

Hugh> I now have a README that in part says:
Hugh> perl Makefile.PL
Hugh> perl script/db.pl
Hugh> make
Hugh> make test
Hugh> make install

Hugh> I'd just as soon that db.pl got run as part of the just 'make' part rather
Hugh> than as a stand alone. This, of course, would get me back to a more vanilla
Hugh> situation--devoutly to be desired!

Randal> As always, the trick in "make" is to figure out "what depends
Randal> on your script being run", and then hook the execution of the
Randal> script into that step.  Does it have to be done before a "make
Randal> build"?  Does it have to be done before a "make test"?  What
Randal> step fails if I don't do it at all?

You can try to get MakeMaker to add additional targets to the
generated Makefile, but I've solved a similar problem be leveraging an
important, but strangely often overlooked fact:

Makefile.PL is a perl script!!  Put the code you want into the
Makefile.PL itself, and run it there.  Noone says that Makefile.PL can
have only the call to WriteMakefile.  You can do whatever your twisted
heart desires.

Now, in my case, the MQSeries perl module suite needa a lot of
automted stuff done before it can be compiled, and I built all of that
into the Makefile.PL files (its a huge heirarchy).

I've seen similar automation in other large packages, too.  Download
the latest MQSeries-1.17.tar.gz, and take a look.  

Reply via email to