From: Ben Pfaff Date: Mon, 30 May 2022 18:05:45 +0000 (-0700) Subject: perl-module: Copy Perl module from srcdir to builddir before distributing. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=465b483003f5b3fdb4d1c311f4ba78e71bf48c51;p=pspp perl-module: Copy Perl module from srcdir to builddir before distributing. I ran into an issue where the Perl tests were failing in distcheck, but not in check. I changed the sources for the Perl module, but distcheck still used the old ones. It turns out that "make dist" uses files from the builddir, which "make dist" wasn't updating from the srcdir because that only happened when the Perl module was actually built, which "make dist" and "make distcheck" don't do. This commit fixes the problem by ensuring that the Perl module files get updated in the builddir on "make dist". --- diff --git a/perl-module/automake.mk b/perl-module/automake.mk index d9e0882006..9bec219254 100644 --- a/perl-module/automake.mk +++ b/perl-module/automake.mk @@ -57,8 +57,9 @@ PHONY += module-make module-make: perl-module/Makefile $(AM_V_GEN)cd perl-module && $(MAKE) $(PERL_MAKEFLAGS) -ALL_LOCAL += perl_module_tarball -perl_module_tarball: $(module_sources) src/libpspp-core.la +PHONY += module-copy +DIST_HOOKS += module-copy +module-copy: $(module_sources) @if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \ for f in $(module_sources); do \ destdir=`dirname $$f` ;\ @@ -75,6 +76,9 @@ perl_module_tarball: $(module_sources) src/libpspp-core.la fi ; \ done \ fi + +ALL_LOCAL += perl_module_tarball +perl_module_tarball: src/libpspp-core.la module-copy $(AM_V_GEN)$(MAKE) $(PERL_MAKEFLAGS) module-make perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz CLEAN_LOCAL += perl_module_clean