Running 'make clean && make' loses all the .3 man pages produced from
generated .pod files. Why? When Makefile.inc does not exist (on the
first run), the value of $(api_built) is updated prior to re-reading
the Makefile, so when the 'all-am: Makefile $(MANS)' dependency from
automake is encountered, $(MANS) includes all the .3 files. But after
'make clean', Makefile.inc still exists, and it is included late
enough that $(MANS) still contains the pre-inclusion state, omitting
all the generated additions. The solution is to add yet another
dependency, which Automake leaves late enough to always occur after
$(MANS) has its full value.
Reported-by: Richard W.M. Jones <rjones(a)redhat.com>
Fixes: 0a8d3987
---
Counter-proposal for Rich's change. I'll go ahead and push it.
docs/Makefile.am | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 30a972d..dd34a3a 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -21,8 +21,12 @@ api_built=
# Our use of sinclude to bypass Automake is intentional; this file won't
# exist in a fresh git checkout until after the generator has run, but
-# should already be present in any released tarball.
+# should already be present in any released tarball. But, since automake
+# can't see into this file, it did not hoist the resulting prerequisites
+# prior to its 'all-am: Makefile $(MANS)' rule, which gets parsed before
+# $(MANS) has grown in size, so we have to add a second all-am dependency.
sinclude $(srcdir)/Makefile.inc
+all-am: $(api_built:%=%.3)
generator_built = \
Makefile.inc \
--
2.20.1
Show replies by date