]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(.x.1): Make sure the required generated files
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Jan 2005 23:25:08 +0000 (23:25 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Jan 2005 23:25:08 +0000 (23:25 +0000)
are up to date.  Problem and original solution proposed by Stepan Kasal.
$(dist_man_MANS:.1=-bin-prereq), $(dist_man_MANS:.1=-tests-prereq),
implicit-man-prerequisites): New rules, used by the above.

man/Makefile.am

index e2c6245d1f59dbe6298dc68c43b5639ee847db70..92055a277f62b694b9ee4076d01eef69973dc20b 100644 (file)
@@ -1,7 +1,7 @@
 ## Process this file with automake to create Makefile.in -*-Makefile-*-
 
 ## Makefile for Autoconf.
-## Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+## Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -50,6 +50,10 @@ $(srcdir)/config.sub.1:   $(top_srcdir)/config/config.sub
 SUFFIXES = .x .1
 
 .x.1:
+       @case $* in \
+         */config.*) ;; \
+         *) $(MAKE) $*-bin-prereq $*-tests-prereq;; \
+       esac
        echo "Updating man page $@"
        PATH="$(top_builddir)/tests@PATH_SEPARATOR@$(top_srcdir)/config@PATH_SEPARATOR@$$PATH"; \
        export PATH; \
@@ -57,3 +61,18 @@ SUFFIXES = .x .1
            --include=$*.x \
            --include=$(srcdir)/common.x \
            --output=$@ `echo "$*" | sed 's,^$(srcdir)/,,'`
+
+
+# While building man page prerequisites, avoid explicit dependencies
+# on any file that is not distributed, so that installers do not
+# unnecessarily attempt to run $(HELP2MAN), a tool that they may not
+# have.
+
+$(dist_man_MANS:.1=-bin-prereq) $(dist_man_MANS:.1=-tests-prereq):
+       @$(MAKE) $(AM_MAKEFLAGS) \
+         builddir=$(top_builddir)/`expr 'X$@' : '.*-\([^-]*\)-prereq$$'` \
+         program=`expr '/$@' : '.*/\([^-]*\)'` \
+         implicit-man-prerequisites
+
+implicit-man-prerequisites:
+       cd $(builddir) && $(MAKE) $(AM_MAKEFLAGS) $(program)