From 2eeff35bcb64c9f3c6651773344483d404c6580a Mon Sep 17 00:00:00 2001 From: Bogdan Drozdowski <> Date: Thu, 22 Aug 2024 23:10:38 +0200 Subject: [PATCH] Fix no-dist-built-sources --- bin/automake.in | 2 +- lib/am/distdir.am | 4 ++-- t/dist-no-built-sources.sh | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bin/automake.in b/bin/automake.in index a17f45236..ee196f28b 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -6903,7 +6903,7 @@ sub preprocess_file 'SHAR' => !! option 'dist-shar', 'ZIP' => !! option 'dist-zip', 'ZSTD' => !! option 'dist-zstd', - 'DIST_BUILT_SOURCES' => !! option 'dist-built-sources', + 'DIST_BUILT_SOURCES' => ! option 'no-dist-built-sources', 'INSTALL-INFO' => ! option 'no-installinfo', 'INSTALL-MAN' => ! option 'no-installman', diff --git a/lib/am/distdir.am b/lib/am/distdir.am index c85f6a325..810290477 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -76,10 +76,10 @@ AM_RECURSIVE_TARGETS += distdir distdir-am endif %?SUBDIRS% if %?DIST_BUILT_SOURCES% -distdir: +distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am else !%?DIST_BUILT_SOURCES% -distdir: $(BUILT_SOURCES) +distdir: $(MAKE) $(AM_MAKEFLAGS) distdir-am endif !%?DIST_BUILT_SOURCES% diff --git a/t/dist-no-built-sources.sh b/t/dist-no-built-sources.sh index d891f3a13..f5891bab4 100644 --- a/t/dist-no-built-sources.sh +++ b/t/dist-no-built-sources.sh @@ -26,6 +26,11 @@ for testopt in no-built-sources dist-built-sources; do configure.ac >configure.tmp cmp configure.ac configure.tmp && fatal_ 'failed to edit configure.ac' mv -f configure.tmp configure.ac + else + sed -e 's/AM_INIT_AUTOMAKE(\[no-dist-built-sources\])/AM_INIT_AUTOMAKE/' \ + configure.ac >configure.tmp + cmp configure.ac configure.tmp && fatal_ 'failed to edit configure.ac' + mv -f configure.tmp configure.ac fi cat >> configure.ac << 'END' @@ -66,9 +71,11 @@ EOF if test "$testopt" = no-built-sources; then # no-built-sources should not have generated this ! test -e x.c + $EGREP "distdir:$" Makefile else # built-sources build should have it test -e x.c + grep "distdir: \$(BUILT_SOURCES)" Makefile fi # If the test runs fast enough, the make dist second time through -- 2.35.1