summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/local.mk19
-rw-r--r--src/local.mk5
2 files changed, 12 insertions, 12 deletions
diff --git a/man/local.mk b/man/local.mk
index d42c98215..80519afce 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 45a6268e2..24462009f 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