GNU bug report logs -
#72237
diffutils "make dist" not compliant with the GNU Coding Standards
Previous Next
Reported by: Bruno Haible <bruno <at> clisp.org>
Date: Sun, 21 Jul 2024 19:33:01 UTC
Severity: normal
Done: Jim Meyering <jim <at> meyering.net>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
According to the GNU Coding Standard
https://www.gnu.org/prep/standards/html_node/Standard-Targets.html
"The dist target should explicitly depend on all non-source files
that are in the distribution, to make sure they are up to date
in the distribution."
An easy way to test whether the 'dist' target has this property
is to run
$ ./configure
$ make dist
or (in a VPATH build)
$ ../configure
$ make dist
without doing "make" before "make dist".
Distributed non-source files that make this difficult are the man pages
for programs, that are generated from the '--help' output using help2man.
While packages that only have a top-level Makefile.am (such as GNU sed
or GNU coreutils) get this right, it is a little bit more complicated
in packages with a Makefile.am per directory (such as GNU diffutils and
GNU gettext). Originally reported for GNU gettext at
<https://lists.gnu.org/archive/html/bug-gettext/2024-07/msg00010.html>.
In GNU diffutils
$ ./configure; make dist V=1
fails like this:
make[3]: Entering directory '/DIFFUTILS/diffutils/man'
make distdir-am
make[4]: Entering directory '/DIFFUTILS/diffutils/man'
base=`expr cmp.1 : '\(.*\).1'` \
&& test -x ../src/$base \
&& (echo '[NAME]' \
&& sed 's@/\* *@@; s/-/\\-/;s/^GNU //; q' ../src/$base.c) \
| PATH="../src:$PATH" \
./help2man -i - -i ./$base.x \
-S 'diffutils 2024-05-21' $base > cmp.1-t && mv cmp.1-t cmp.1
make[4]: *** [Makefile:2483: cmp.1] Error 1
make[4]: Leaving directory '/DIFFUTILS/diffutils/man'
make[3]: *** [Makefile:2322: distdir] Error 2
make[3]: Leaving directory '/DIFFUTILS/diffutils/man'
The attached patch fixes it. Tested also with VPATH builds, with
- GNU make,
- FreeBSD make,
- NetBSD make.
Tested also with parallel make, through
$ ./configure; make -j8 dist V=1
[0001-build-Fix-failure-of-.-configure-make-dist.patch (text/x-patch, attachment)]
This bug report was last modified 1 year and 31 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.