Correct the directory of the perl module tarball target
[pspp-builds.git] / perl-module / automake.mk
index 54ccd823ce1580181e71ec5cfccf91d8552a0be8..7fad5e425c3930ea4ba256cb4cf889ce4e452fbf 100644 (file)
@@ -30,30 +30,31 @@ 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)
 
+
+perl-module/PSPP-Perl-$(VERSION).tar.gz: $(module_sources)
+       $(RM) $@
+       cd perl-module && $(MAKE) $(AM_MAKEFLAGS) tardist
+
+.PHONY: module-make
 module-make: perl-module/Makefile
        cd perl-module && $(MAKE) $(AM_MAKEFLAGS)
 
-perl-module/lib/pspp-vers.pl: src/libpspp/version.c Makefile
-       mkdir -p perl-module/lib
-       (cd $(top_srcdir) && echo "\$$top_srcdir='"`pwd`"';") > $@
-       $(GREP) '^\$$VERSION' $(top_builddir)/src/libpspp/version.c | $(SED) -e 's/VERSION/PSPP::VERSION/' >> $@
-
-all-local: perl-module/lib/pspp-vers.pl
+all-local: 
        if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \
         for f in $(module_sources); do \
          destdir=`dirname $$f` ;\
          mkdir -p $$destdir ;\
          if test "$(top_srcdir)/$$f" -nt "$(top_builddir)/$$f" ; then \
                 cp $(top_srcdir)/$$f $$destdir ; \
+                echo cp $(top_srcdir)/$$f $$destdir ; \
          fi ; \
         done \
        fi
-       $(MAKE) $(AM_MAKEFLAGS) module-make
-
+       $(MAKE) $(AM_MAKEFLAGS) module-make perl-module/PSPP-Perl-$(VERSION).tar.gz
 
 check-local:
        loc=`pwd` ; cd $(top_builddir)/src/.libs ; llp=`pwd` ; cd $$loc ;  \
-       LD_LIBRARY_PATH=$$llp sh -c "cd perl-module && $(MAKE) $(AM_MAKEFLAGS) test "
+       LD_LIBRARY_PATH=$$llp sh -c "cd perl-module && $(MAKE) $(AM_MAKEFLAGS) test"
 
 
 clean-local:
@@ -65,8 +66,8 @@ 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 \
        perl-module/const-xs.inc