Subject: bug#72236: closed (Re: [bug-diffutils] bug#72236: generate programs' man pages in the source directory, per GCS)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 22 Jul 2024 16:08:02 +0000

Your bug report

#72236: generate programs' man pages in the source directory, per GCS

which was filed against the diffutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
72236: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72236
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug-diffutils] bug#72236: generate programs' man pages in the source directory, per GCS
From: Bruno Haible <[email-masked]>
To: Jim Meyering <[email-masked]>
Cc: [email-masked]
Date: Mon, 22 Jul 2024 18:07:06 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Jim Meyering wrote:
> I've applied your patch with one small change

https://git.savannah.gnu.org/gitweb/?p=diffutils.git;a=commitdiff;h=7f9bf95640db00aaf82125799429732b99c5f730

Marking as done.

Subject: generate programs' man pages in the source directory, per GCS
From: Bruno Haible <[email-masked]>
To: [email-masked]
Date: Sun, 21 Jul 2024 21:24:25 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

The files man/*.1 are included in the tarballs. By the GNU Coding Standards
<https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>
they should be generated in the source directory.

But this is not what happens:

$ ./configure; make -k maintainer-clean
$ ./bootstrap
$ mkdir bb
$ cd bb
$ ../configure
$ make
$ ls -l ../man/*.1
ls: cannot access '../man/*.1': No such file or directory
$ ls -l man/*.1
-rw-rw-r-- 1 bruno bruno 2245 21. Jul 21:12 man/cmp.1
-rw-rw-r-- 1 bruno bruno 6469 21. Jul 21:12 man/diff.1
-rw-rw-r-- 1 bruno bruno 2858 21. Jul 21:12 man/diff3.1
-rw-rw-r-- 1 bruno bruno 2869 21. Jul 21:12 man/sdiff.1

This patch fixes it.

With it, the result is:

$ ls -l ../man/*.1
-rw-rw-r-- 1 bruno bruno 2245 21. Jul 21:16 ../man/cmp.1
-rw-rw-r-- 1 bruno bruno 6469 21. Jul 21:16 ../man/diff.1
-rw-rw-r-- 1 bruno bruno 2858 21. Jul 21:16 ../man/diff3.1
-rw-rw-r-- 1 bruno bruno 2869 21. Jul 21:16 ../man/sdiff.1
$ ls -l man/*.1
ls: cannot access 'man/*.1': No such file or directory

>From 70bf44033736937e9b804930e7f23721e369d6df Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email-masked]>
Date: Sun, 21 Jul 2024 21:22:28 +0200
Subject: [PATCH] build: Generate programs' man pages in the source directory,
 per GCS

* man/Makefile.am ($(dist_man1_MANS)): Generate the *.1 files in
$(srcdir), not in the build dir.
---
 man/Makefile.am | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 8b1ea20..00ba124 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -34,7 +34,8 @@ $(dist_man1_MANS): $(SRC_VERSION_C) help2man
 	$(AM_V_GEN)base=`expr $@ : '\(.*\).1'`				\
 	  && test -x $(bin_dir)/$$base					\
 	  && (echo '[NAME]'						\
-              && sed 's@/\* *@@; s/-/\\-/;s/^GNU //; q' $S/$$base.c)	\
+	      && sed 's@/\* *@@; s/-/\\-/;s/^GNU //; q' $S/$$base.c)	\
 	     | PATH="$(bin_dir)$(PATH_SEPARATOR)$$PATH"			\
 	       $(srcdir)/help2man -i - -i $(srcdir)/$$base.x		\
-		 -S '$(PACKAGE) $(VERSION)' $$base > $@-t && mv $@-t $@
+	         -S '$(PACKAGE) $(VERSION)' $$base > $$base.1-t		\
+	  && mv $$base.1-t $(srcdir)/$$base.1
-- 
2.34.1