Commit
30f21302 "perl-module: Tolerate minor PSPP version number
differences" tried to improve the behavior of the PSPP Perl module when
the PSPP version number includes a suffix such as -build40. But it didn't
entirely work, since it overlooked some uses of $(VERSION) in
perl-module/automake.mk. This commit fixes those too.
if test "$PERL" != no && $PERL -e 'require 5.005_03;'; then :; else
PSPP_REQUIRED_PREREQ([Perl 5.005_03 (or later)])
fi
+
+ # The PSPP autobuilder appends a build number to the PSPP version number,
+ # e.g. "0.7.2-build40". But Perl won't parse version numbers that contain
+ # anything other than digits and periods, so "-build" causes an error. So we
+ # define $(VERSION_FOR_PERL) that drops everything from the hyphen onward.
+ VERSION_FOR_PERL=`echo "$VERSION" | sed 's/-.*//'`
+ AC_SUBST([VERSION_FOR_PERL])
])
dnl Check that libplot is available.
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)
+perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz: $(module_sources)
$(RM) $@
cd perl-module && $(MAKE) $(AM_MAKEFLAGS) tardist
fi ; \
done \
fi
- $(MAKE) $(AM_MAKEFLAGS) module-make perl-module/PSPP-Perl-$(VERSION).tar.gz
+ $(MAKE) $(AM_MAKEFLAGS) module-make perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz
ALL_LOCAL += perl_module_tarball
CLEAN_LOCAL += perl_module_CLEAN
CLEANFILES += \
- perl-module/PSPP-Perl-$(VERSION).tar.gz \
+ perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz \
perl-module/pspp-module-config \
perl-module/const-c.inc \
perl-module/const-xs.inc
echo " Generated by src/libpspp/automake.mk --- Do not edit.">> $@
echo "" >> $@
echo " The following line is for the benefit of the perl module" >>$@
- echo "\$$VERSION='`echo '$(VERSION)' | sed 's/-.*//'`';" >> $@
+ echo "\$$VERSION='$(VERSION_FOR_PERL)';" >> $@
echo "*/" >> $@
echo "#include \"version.h\"" >> $@
echo "const char bare_version[] = \"@VERSION@\";" >> $@