From 5e7e6c8417aee2b983d1725101bf66fe5fea2aaa Mon Sep 17 00:00:00 2001
From: John Darrington <john@darrington.wattle.id.au>
Date: Sun, 11 Jan 2009 09:45:47 +0900
Subject: [PATCH] Add the perl module tarball to the build target

---
 perl-module/automake.mk | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/perl-module/automake.mk b/perl-module/automake.mk
index 54ccd823ce..71d589f516 100644
--- a/perl-module/automake.mk
+++ b/perl-module/automake.mk
@@ -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,8 +54,7 @@ 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:
 	loc=`pwd` ; cd $(top_builddir)/src/.libs ; llp=`pwd` ; cd $$loc ;  \
@@ -65,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 \
-- 
2.30.2