rvosa has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,

for a multilingual development project we have chosen to automate our builds using apache ant. Part of the source tree consists of a bunch of perl modules. I'd like to wrap the standard...
perl Makefile.PL make make test make install

...installation that these modules use inside an ant build.xml so that we can build and install the whole project recursively using ant, while under the hood preserving the standard perl installation procedures (using extutils::mm). Does anyone have any experience with this?

Thanks!

Replies are listed 'Best First'.
Re: Using ant to wrap module installation
by crashtest (Curate) on May 20, 2006 at 00:31 UTC

    Ant provides an exec task in order to allow you to fall back on the command line:

    <property name="perlmod.dir" location="/tmp/module"/> <target name="example-mod_build"> <exec dir="${perlmod.dir}" executable="perl" failonerror="true"> <arg line="Makefile.PL"/> </exec> <exec dir="${perlmod.dir}" executable="make" failonerror="true"/> <exec dir="${perlmod.dir}" executable="make" failonerror="true"> <arg line="test"/> </exec> <exec dir="${perlmod.dir}" executable="make" failonerror="true"> <arg line="install"/> </exec> </target>

    (See: Exec)

    I should point out that this isn't something I've ever needed to do, but if I had to, this is how I'd go about it.

    Hope this helps.

      Back at my old job at NASA, we had a set of Python and Perl SOAP processes that we installed using something very like this. It works quite nicely.