Teach Perl Makefile to build Build for every target
authorDan Scott <dan@coffeecode.net>
Wed, 18 May 2011 14:23:18 +0000 (10:23 -0400)
committerDan Scott <dan@coffeecode.net>
Wed, 18 May 2011 14:29:44 +0000 (10:29 -0400)
With the previous Perl Makefile.am, running "make check" before
running "make all" would fail on the Perl directory because it
assumed that Build would have been created from Build.PL. Factoring out
the build of Build from Build.PL and making that a prereq of the
pertinent targets avoids that problem on a clean checkout of the
OpenSRF source.

Signed-off-by: Dan Scott <dan@coffeecode.net>
src/perl/Makefile.am

index 047b503..0d27bfa 100644 (file)
 CLEANFILES = Build
 DISTCLEANFILES = Makefile.in Makefile
 
-all:
-       perl Build.PL || make -s build-perl-fail
+all: build-perl
        ./Build || make -s build-perl-fail
 
-check:
+check: build-perl
        ./Build test || make -s build-perl-fail
 
-install:
+install: build-perl
        ./Build install
 
+build-perl:
+       perl Build.PL || make -s build-perl-fail
+
 build-perl-fail:
        echo
        echo ">>> Build/test of Perl modules has failed. The most likely"
@@ -42,4 +44,4 @@ install-perl-fail:
 
 distclean-local:
        rm -rf ./_build
-       rm -rf ./blib
\ No newline at end of file
+       rm -rf ./blib