Add the perl module tarball to the build target
[pspp-builds.git] / perl-module / automake.mk
index 2b83831366c29537c77af53f81fd0d6894054b95..71d589f516b7053b074907d4b45fda762ffcc709 100644 (file)
@@ -30,6 +30,12 @@ perl-module/pspp-module-config: Makefile
 perl-module/Makefile: perl-module/Makefile.PL perl-module/pspp-module-config
        cd perl-module && $(PERL) Makefile.PL PREFIX=$(prefix)
 
+
+PSPP-Perl-$(VERSION).tar.gz:
+       cd perl-module && $(RM) $@
+       cd perl-module && $(MAKE) $(AM_MAKEFLAGS) tardist
+
+.PHONY: module-make
 module-make: perl-module/Makefile
        cd perl-module && $(MAKE) $(AM_MAKEFLAGS)
 
@@ -48,10 +54,11 @@ all-local: perl-module/lib/pspp-vers.pl
          fi ; \
         done \
        fi
-       $(MAKE) $(AM_MAKEFLAGS) module-make
+       $(MAKE) $(AM_MAKEFLAGS) module-make PSPP-Perl-$(VERSION).tar.gz
 
 check-local:
-       cd perl-module && $(MAKE) $(AM_MAKEFLAGS) test
+       loc=`pwd` ; cd $(top_builddir)/src/.libs ; llp=`pwd` ; cd $$loc ;  \
+       LD_LIBRARY_PATH=$$llp sh -c "cd perl-module && $(MAKE) $(AM_MAKEFLAGS) test "
 
 
 clean-local:
@@ -63,6 +70,7 @@ clean-local:
 
 
 CLEANFILES += \
+        perl-module/PSPP-Perl-$(VERSION).tar.gz \
        perl-module/pspp-module-config \
        perl-module/lib/pspp-vers.pl \
        perl-module/const-c.inc \