]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: generate all man pages for distribution tarball
authorKarel Zak <kzak@redhat.com>
Tue, 25 Jan 2022 10:04:13 +0000 (11:04 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 14 Feb 2022 09:32:32 +0000 (10:32 +0100)
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 <kzak@redhat.com>
Makefile.am

index f5a74b5ddba2d7b5108e13c25d514c190d13dcc2..29496e72c0cf7c827f4e85470b4b42412ac34527 100644 (file)
@@ -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