GNU bug report logs - #72237
diffutils "make dist" not compliant with the GNU Coding Standards

Previous Next

Package: diffutils;

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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jim Meyering <jim <at> meyering.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#72237: closed (diffutils "make dist" not compliant with the
 GNU Coding Standards)
Date: Mon, 22 Jul 2024 15:02:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 22 Jul 2024 08:01:36 -0700
with message-id <CA+8g5KF3yFzNqu0TzwZKaGRykpdU1LTJVGf2i4yvWizSeZa=aQ <at> mail.gmail.com>
and subject line Re: [bug-diffutils] bug#72237: diffutils "make dist" not compliant with the GNU Coding Standards
has caused the debbugs.gnu.org bug report #72237,
regarding diffutils "make dist" not compliant with the GNU Coding Standards
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
72237: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72237
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Bruno Haible <bruno <at> clisp.org>
To: bug-diffutils <at> gnu.org
Subject: diffutils "make dist" not compliant with the GNU Coding Standards
Date: Sun, 21 Jul 2024 21:31:52 +0200
[Message part 3 (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)]
[Message part 5 (message/rfc822, inline)]
From: Jim Meyering <jim <at> meyering.net>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 72237-done <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#72237: diffutils "make dist" not compliant
 with the GNU Coding Standards
Date: Mon, 22 Jul 2024 08:01:36 -0700
marking as done


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.