From: Karel Zak Date: Tue, 25 Jan 2022 10:04:13 +0000 (+0100) Subject: build-sys: generate all man pages for distribution tarball X-Git-Tag: v2.37.4~4 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=86f89da80e381050745ebd574fb8faa3a4016279;p=thirdparty%2Futil-linux.git build-sys: generate all man pages for distribution tarball Now "make dist" and "make distcheck" follows autoconf. It means that disabled tools or tools that cannot compile are ignored, and man-pages for these tools are not generated. This is a problem for people without asciidoctor (adoc -> man generator). Fixes: https://github.com/util-linux/util-linux/issues/1577 Signed-off-by: Karel Zak --- diff --git a/Makefile.am b/Makefile.am index f5a74b5ddb..29496e72c0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -218,6 +218,18 @@ SUFFIXES = .1.adoc .3.adoc .5.adoc .8.adoc .1 .3 .5 .8 $(MANLINKS): $(MANPAGES) gen-man: $(man_MANS) +# Standard "make" follows BUILD_* macros from ./configure, and in this case, it +# ignores man pages for disabled tools, but for distribution tarball, we need +# to generate all man-pages (to avoid dependence on asciidoc). [kzak Jan-2022] +gen-man-dist: + @list=`find -name *.adoc -not -path "*/man-common/*" -not -path "*/po-man/*" | sed -e 's/\.adoc//g'`; \ + missing=`for p in $$list; do test -f $$p || echo $$p; done`; \ + if test -n "$$missing"; then \ + $(MAKE) $(AM_MAKEFLAGS) $$missing; \ + fi; + + +# !ENABLE_ASCIIDOC else if HAVE_MANPAGES @@ -226,12 +238,13 @@ man_MANS += $(MANPAGES) $(MANLINKS) endif gen-man: +gen-man-dist: endif # Arrange so that .tarball-version appears only in the distribution # tarball, and never in a checked-out repository. -dist-hook: +dist-hook: gen-man-dist echo $(VERSION) > $(distdir)/.tarball-version # Set ChangeLog tag reference. sed -i "s!log!log?h=v$(VERSION)!" $(distdir)/ChangeLog