bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] bug#72237: diffutils "make dist" not compliant with the


From: Bruno Haible
Subject: [bug-diffutils] bug#72237: diffutils "make dist" not compliant with the GNU Coding Standards
Date: Sun, 21 Jul 2024 21:31:52 +0200

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

Attachment: 0001-build-Fix-failure-of-.-configure-make-dist.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]