bug#78960: VPATH build fails

Pádraig Brady <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
On 05/07/2025 15:54, Bruno Haible wrote:
> Pádraig Brady wrote:
>> I pushed the following which passes both types of builds here.
>> Marking this as done.
>>
>> cheers,
>> Padraig
>>
>> diff --git a/src/local.mk b/src/local.mk
>> index 537032578..fb763c4db 100644
>> --- a/src/local.mk
>> +++ b/src/local.mk
>> @@ -708,7 +708,7 @@ src/version.h: Makefile
>>    # -PD: MSVC (usable with a wrapper such as cccl from the SWIG project)
>>    getmacopts = -dM -xdumpmacros -qshowmacros -PD
>>
>> -CLEANFILES += src/speedlist.h
>> +BUILT_SOURCES += src/speedlist.h
>>    src/speedlist.h: src/termios.c lib/config.h src/speedgen
>>           $(AM_V_GEN)rm -f $@
>>           $(AM_V_at)${MKDIR_P} src
>> @@ -718,8 +718,6 @@ src/speedlist.h: src/termios.c lib/config.h src/speedgen
>>           $(AM_V_at)chmod a-w $@t
>>           $(AM_V_at)mv $@t $@
>>
>> -src/stty.c: src/speedlist.h
>> -
>>    # Generates a list of macro invocations like:
>>    #   SINGLE_BINARY_PROGRAM(program_name_str, main_name)
>>    # once for each program list on $(single_binary_progs). Note that
>>
> 
> That's better. But now, "make distcheck" fails in a different way,
> namely in dist-check.mk line 127:
> 
> ...
> rm -f Makefile
> make[3]: Leaving directory '/home/runner/work/ci-check/ci-check/coreutils/tests/torture/coreutils/test/coreutils-2025-07-05'
> (cd /home/runner/work/ci-check/ci-check/coreutils/tests/torture/coreutils/test && mv coreutils-2025-07-05 coreutils-2025-07-05.old	\
>    && ${TAR-tar} -Jxf - ) < coreutils-2025-07-05.tar.xz
> find /home/runner/work/ci-check/ci-check/coreutils/tests/torture/coreutils/test/coreutils-2025-07-05.old /home/runner/work/ci-check/ci-check/coreutils/tests/torture/coreutils/test/coreutils-2025-07-05 -name .deps | xargs -r rmdir
> diff -ur /home/runner/work/ci-check/ci-check/coreutils/tests/torture/coreutils/test/coreutils-2025-07-05.old /home/runner/work/ci-check/ci-check/coreutils/tests/torture/coreutils/test/coreutils-2025-07-05
> Only in /home/runner/work/ci-check/ci-check/coreutils/tests/torture/coreutils/test/coreutils-2025-07-05.old/src: speedlist.h
> make[2]: *** [dist-check.mk:116: my-distcheck] Error 1
> make[2]: Leaving directory '/home/runner/work/ci-check/ci-check/coreutils'
> make[1]: *** [Makefile:25823: distcheck-hook] Error 2
> make[1]: Leaving directory '/home/runner/work/ci-check/ci-check/coreutils'
> make: *** [Makefile:23735: distcheck] Error 1

`make distcheck` passes here with the following, which I've just pushed.

cheers,
Padraig

commit fd59e4a955970b2a6c2796578f1bc8b57604f731 (HEAD -> master)Author: Pádraig Brady <[email protected]>
Date:   Sat Jul 5 17:45:00 2025 +0100

     build: avoid make distcheck error

     * src/local.mk: Similarly to commit v8.22-156-g09937e9d0
     track speedlist.h with nodist_src_stty_SOURCES and DISTCLEANFILES
     to ensure the make distcheck manifest comparison passes.
     Addresses https://bug.gnu.org/78960

diff --git a/src/local.mk b/src/local.mk
index fb763c4db..50957a8cd 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -371,6 +371,9 @@ src___SOURCES = src/lbracket.c
  nodist_src_coreutils_SOURCES = src/coreutils.h
  src_coreutils_SOURCES = src/coreutils.c

+nodist_src_stty_SOURCES = src/speedlist.h
+src_stty_SOURCES = src/stty.c
+
  src_cp_SOURCES = src/cp.c $(copy_sources) $(selinux_sources)
  src_date_SOURCES = src/date.c src/show-date.c
  src_dir_SOURCES = src/ls.c src/ls-dir.c
@@ -709,6 +712,7 @@ src/version.h: Makefile
  getmacopts = -dM -xdumpmacros -qshowmacros -PD

  BUILT_SOURCES += src/speedlist.h
+DISTCLEANFILES += src/speedlist.h
  src/speedlist.h: src/termios.c lib/config.h src/speedgen
         $(AM_V_GEN)rm -f $@
         $(AM_V_at)${MKDIR_P} src
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.