diff options
author | Jim Meyering <meyering@fb.com> | 2015-08-31 23:12:43 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2015-09-01 21:09:10 -0700 |
commit | 2cd4ff3a5ff52d89b6b992d158f389b757f4faf4 (patch) | |
tree | ba909374dfc74a294b05fe34850b672809668928 /man | |
parent | 5801f8add854c842e8065225d261f459089d7ac8 (diff) | |
download | diffutils-2cd4ff3a5ff52d89b6b992d158f389b757f4faf4.tar.gz |
build: correct man-page generation rule
The PATH was set incorrectly, so that the diff used by
help2man was the one from $PATH, rather than the just-built
one.
* man/Makefile.am (bin_dir): New variable, to...
(dist_man1_MANS): ...prepend ../src to PATH, not just "..".
Also, add a test to ensure that each $(bin_dir)/$$base is
executable, so this doesn't happen again.
In http://debbugs.gnu.org/21023, Rodrigo Valiña
Gutiérrez reported that diff.1 from the diffutils-3.3 tarball
contained no description of the then-new --no-dereference option.
Diffstat (limited to 'man')
-rw-r--r-- | man/Makefile.am | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/man/Makefile.am b/man/Makefile.am index fd136d2..de55e00 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -25,10 +25,15 @@ diff.1: $S/diff.c diff.x diff3.1: $S/diff3.c diff3.x sdiff.1: $S/sdiff.c sdiff.x +# Directory in which just-built programs reside. It is used +# to ensure help2man invokes them via the use of PATH below. +bin_dir = ../src + # Depend on the former to get version number changes. $(dist_man1_MANS): $(SRC_VERSION_C) help2man $(AM_V_GEN)base=`expr $@ : '\(.*\).1'` \ + && test -x $(bin_dir)/$$base \ && (echo '[NAME]' && sed 's@/\* *@@; s/-/\\-/; q' $S/$$base.c) \ - | PATH="..$(PATH_SEPARATOR)$$PATH" \ + | PATH="$(bin_dir)$(PATH_SEPARATOR)$$PATH" \ $(srcdir)/help2man -i - -i $(srcdir)/$$base.x \ -S '$(PACKAGE) $(VERSION)' $$base > $@-t && mv $@-t $@ |