autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] docs: gnuconfig manual page generating


From: Pavel Raiskup
Subject: [PATCH] docs: gnuconfig manual page generating
Date: Wed, 12 Nov 2014 15:36:32 +0100

Don't generate empty manual pages when config.sub/config.guess
files are updated in distribution tarball and help2man is not
installed; don't fail either.

Resist on not 'touch'ing the old pre-generated manual page to not
hide the problem, however.  Also for git builds stay fatal and
enforce help2man installation; just to avoid generating broken
distribution tarballs.

References:
https://bugzilla.redhat.com/1162227

* man/local.mk (.x.1): Detect missing 'help2man', don't reubild
the manpage then, be fatal if building against git.
---
 man/local.mk | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/man/local.mk b/man/local.mk
index 7514ec4..3f3cffc 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -60,11 +60,18 @@ SUFFIXES += .x .1
            --include=$*.x \
            --include=$(srcdir)/man/common.x \
            --source='$(PACKAGE_STRING)' \
-           address@hidden `echo '$*' | sed 's,.*/,,'`
-       if sed $(remove_time_stamp) $@ >address@hidden 2>/dev/null && \
-          sed $(remove_time_stamp) address@hidden | cmp address@hidden - 
>/dev/null 2>&1; then \
-               touch $@; \
-       else \
-               mv address@hidden $@; \
-       fi
-       rm -f address@hidden
+           address@hidden `echo '$*' | sed 's,.*/,,'` ; \
+       rc=$$? ; \
+       if test $$rc -eq 127; then \
+         test ! -e "$(top_srcdir)/.git" && rc=0 ; \
+       elif test $$rc -eq 0; then \
+         if sed $(remove_time_stamp) $@ >address@hidden 2>/dev/null && \
+            sed $(remove_time_stamp) address@hidden | cmp address@hidden - 
>/dev/null 2>&1; then \
+           touch $@; \
+         else \
+           mv address@hidden $@; \
+         fi ; \
+         rc=$$? ; \
+       fi ; \
+       rm -f address@hidden ; \
+       exit $$rc
-- 
1.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]