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)' \ - --output=$@.t `echo '$*' | sed 's,.*/,,'` - if sed $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \ - sed $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \ - touch $@; \ - else \ - mv $@.t $@; \ - fi - rm -f $@*.t + --output=$@.t `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) $@ >$@a.t 2>/dev/null && \ + sed $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \ + touch $@; \ + else \ + mv $@.t $@; \ + fi ; \ + rc=$$? ; \ + fi ; \ + rm -f $@*.t ; \ + exit $$rc -- 1.9.3