[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/9] build: fix generation of manpages for programs not built
From: |
Stefano Lattarini |
Subject: |
[PATCH v2 4/9] build: fix generation of manpages for programs not built by default |
Date: |
Fri, 31 Aug 2012 17:46:40 +0200 |
* src/local.mk (dist-hook): Don't use this to ensure all the
programs, even the ones disabled by default or by the user, are
built (doing so is required to generate the distributed manpages
are properly built). This would build those programs too late
anyway, causing errors like:
$ make dist
make dist-xz am__post_remove_distdir='@:'
make[1]: Entering directory `~/src/coreutils'
GEN man/arch.1
help2man: can't get '--help' info from man/arch.td/arch
make[1]: *** [man/arch.1] Error 127
make[1]: Leaving directory `~/src/coreutils'
make: *** [dist] Error 2
Instead, ...
* man/local.mk (extra_man_x, extra_man_1): define these ...
($(extra_man_1)): ... and make this depend on $(all_programs).
(EXTRA_DIST): Adjust.
Adjust some comments as well.
---
man/local.mk | 19 ++++++++++++-------
src/local.mk | 5 -----
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/man/local.mk b/man/local.mk
index d42c982..80519af 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -25,13 +25,18 @@ MAINTAINERCLEANFILES += $(dist_man1_MANS)
# The "$(VAR:%=dir/%.x)" idiom is not portable according to POSIX, but in
# practice it works with several make implementation (GNU, BSD, CCS make
-# from Solaris 10, Sun distributed make). In addition, since only
-# maintainers are expected to build release tarballs (and they should
-# use GNU make when doing so), it's not big deal if this won't work with
-# some dumber make implementation.
-EXTRA_DIST += \
- $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x) \
- $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)
+# from Solaris 10, Sun distributed make).
+extra_man_x = $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x)
+extra_man_1 = $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)
+
+EXTRA_DIST += $(extra_man_1) $(extra_man_x)
+
+# This is required because we have subtle inter-directory dependencies:
+# in order to generate all man pages, even those for which we don't
+# install a binary, require that all programs be built at distribution
+# time. We can't use 'dist-hook' for this, since it would run too late:
+# the manpages must be generated before the distdir is created and filled.
+$(extra_man_1): $(all_programs)
# Depend on this to get version number changes.
mandep = .version
diff --git a/src/local.mk b/src/local.mk
index 45a6268..2446200 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -495,11 +495,6 @@ all_programs.list:
| sed /libstdbuf/d \
| $(ASSORT) -u
-# This is required because we have broken inter-directory dependencies:
-# in order to generate all man pages, even those for which we don't
-# install a binary, require that all programs be built at distribution time.
-dist-hook: $(all_programs)
-
pm = progs-makefile
pr = progs-readme
# Ensure that the list of programs in README matches the list
--
1.7.12
- Re: [PATCH 0/6] Patches to avoid use of make recursion in the 'src/' subdir, (continued)
- Re: [PATCH 0/6] Patches to avoid use of make recursion in the 'src/' subdir, Jim Meyering, 2012/08/31
- Re: [PATCH 0/6] Patches to avoid use of make recursion in the 'src/' subdir, Stefano Lattarini, 2012/08/31
- Re: [PATCH 0/6] Patches to avoid use of make recursion in the 'src/' subdir, Jim Meyering, 2012/08/31
- [PATCH v2 0/9] Patches to avoid use of make recursion in the 'src/' subdir, Stefano Lattarini, 2012/08/31
- [PATCH v2 1/9] maint: add our 'bootstrap_post_import_hook' function, Stefano Lattarini, 2012/08/31
- [PATCH v2 3/9] build: don't use recursive make to build the 'src' subdirectory, Stefano Lattarini, 2012/08/31
- [PATCH v2 2/9] build: refactor how lists of coreutils programs are defined, Stefano Lattarini, 2012/08/31
- [PATCH v2 4/9] build: fix generation of manpages for programs not built by default,
Stefano Lattarini <=
- [PATCH v2 7/9] maint: fix and simplify maintainer checks, Stefano Lattarini, 2012/08/31
- [PATCH v2 6/9] maint: remove unused target 'install-root', Stefano Lattarini, 2012/08/31
- [PATCH v2 5/9] maint: improve remake rules for maintainers, Stefano Lattarini, 2012/08/31
- [PATCH v2 8/9] maint: fix one stray reference to src/Makefile.am, Stefano Lattarini, 2012/08/31
- [PATCH v2 9/9] maint: update gitignore entries, Stefano Lattarini, 2012/08/31
- Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the 'src/' subdir, Jim Meyering, 2012/08/31
- Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the 'src/' subdir, Stefano Lattarini, 2012/08/31
- Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the 'src/' subdir, Jim Meyering, 2012/08/31
- Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the 'src/' subdir, Jim Meyering, 2012/08/31
- Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the 'src/' subdir, Jim Meyering, 2012/08/31