autoconf-patches
[Top][All Lists]
Advanced

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

Fix VPATH man page build on FreeBSD, GNU


From: Noah Misch
Subject: Fix VPATH man page build on FreeBSD, GNU
Date: Sun, 26 Dec 2004 22:35:10 -0800
User-agent: Mutt/1.5.6i

`missing' has not been effective at silencing the dependency on `help2man' when
a user does a VPATH builds and does not have `help2man' installed.  You can
observe this by touching a dependency of a man page and then running make;
`missing' will generate a stub man page in $(top_builddir)/man and raise an
error instead of touching the existing man page in $(top_srcdir)/man.

The situation is worse with FreeBSD `make', which does not find even up-to-date
man pages in the srcdir.  It always generates the stubs.  Yuck.  I fixed this by
explicitly finding the man pages in $(srcdir).

The same problem afflicted the rule for `INSTALL'.  The rule was written such
that `missing' did the right thing, but FreeBSD `make' still rebuilt it every
time one ran `make'.

With this patch, a VPATH build has no spurious rebuilds on FreeBSD.  `missing'
touches the existing man page if you change a man page dependency (on FreeBSD or
GNU) and do not have `help2man'.  `make distcheck' continues to pass on GNU.

Tru64 `make' rule-rewriting breaks the mktests.sh rule in a VPATH build.  I did
not want to uglify the `Makefile.am' with a fix, so I just documented the issue
in BUGS.

2004-12-27  Noah Misch  <address@hidden>

        * BUGS (Minor Problems): Warn about makefile limitations.
        * Makefile.am: Find and update `INSTALL' in $(srcdir).
        * man/Makefile.am: Find and update manual pages in $(srcdir).

diff -U4 -rpX dontdiff ac-clean/BUGS ac-mans/BUGS
--- ac-clean/BUGS       2004-11-28 23:29:08.000000000 -0500
+++ ac-mans/BUGS        2004-12-26 23:43:26.427696923 -0500
@@ -32,4 +32,12 @@ and use with caution an Autoconf with ``
                     | Sane for full scale use.  |
                     `--------------------------*/
 
 * No known serious or important bugs.
+
+* Minor Problems
+
+Some Makefile segments do not behave correctly in VPATH builds with proprietary
+`make' programs.  Some BSD `make's will work.  For best results, build in the
+source directory or use GNU `make'.
+
+Parallel builds via `make -jN' do not work.
diff -U4 -rpX dontdiff ac-clean/Makefile.am ac-mans/Makefile.am
--- ac-clean/Makefile.am        2004-12-09 17:09:05.000000000 -0500
+++ ac-mans/Makefile.am 2004-12-26 22:24:23.193873556 -0500
@@ -29,9 +29,9 @@ ACLOCAL_AMFLAGS = -I config
 EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 \
             BUGS \
             GNUmakefile Makefile.maint Makefile.cfg
 
-MAINTAINERCLEANFILES = INSTALL
+MAINTAINERCLEANFILES = $(srcdir)/INSTALL
 
 ## -------------------- ##
 ## Forwarding targets.  ##
 ## -------------------- ##
@@ -45,12 +45,12 @@ html:
 ## --------- ##
 ## INSTALL.  ##
 ## --------- ##
 
-pkgdata_DATA = INSTALL
+pkgdata_DATA = $(srcdir)/INSTALL
 AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split
-INSTALL: $(top_srcdir)/doc/install.texi
-       $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -o $(srcdir)/INSTALL \
+$(srcdir)/INSTALL: $(top_srcdir)/doc/install.texi
+       $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -o $@ \
          $(top_srcdir)/doc/install.texi
 
 ## maintainer-check ##
 maintainer-check: maintainer-check-tests
diff -U4 -rpX dontdiff ac-clean/man/Makefile.am ac-mans/man/Makefile.am
--- ac-clean/man/Makefile.am    2004-12-10 20:36:33.000000000 -0500
+++ ac-mans/man/Makefile.am     2004-12-26 21:03:03.321239552 -0500
@@ -17,38 +17,43 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-dist_man_MANS = autoconf.1 autoreconf.1 autoheader.1 autoupdate.1 ifnames.1 \
-autoscan.1 autom4te.1 config.guess.1 config.sub.1
+dist_man_MANS = \
+       $(srcdir)/autoconf.1 \
+       $(srcdir)/autoheader.1 \
+       $(srcdir)/autom4te.1 \
+       $(srcdir)/autoreconf.1 \
+       $(srcdir)/autoscan.1 \
+       $(srcdir)/autoupdate.1 \
+       $(srcdir)/ifnames.1 \
+       $(srcdir)/config.guess.1 \
+       $(srcdir)/config.sub.1
 
-man_aux = autoconf.x autoreconf.x autoheader.x autoupdate.x ifnames.x \
-autoscan.x autom4te.x config.guess.x config.sub.x
-
-EXTRA_DIST = $(man_aux) common.x
+EXTRA_DIST = $(dist_man_MANS:.1=.x) common.x
 MAINTAINERCLEANFILES = $(dist_man_MANS)
 
 # Depend on configure.ac to get version number changes.
 common_dep = $(top_srcdir)/configure.ac $(srcdir)/common.x
 binsrcdir = $(top_srcdir)/bin
-autoconf.1:   $(common_dep) $(binsrcdir)/autoconf.as
-autoheader.1: $(common_dep) $(binsrcdir)/autoheader.in
-autom4te.1:   $(common_dep) $(binsrcdir)/autom4te.in
-autoreconf.1: $(common_dep) $(binsrcdir)/autoreconf.in
-autoscan.1:   $(common_dep) $(binsrcdir)/autoscan.in
-autoupdate.1: $(common_dep) $(binsrcdir)/autoupdate.in
-ifnames.1:    $(common_dep) $(binsrcdir)/ifnames.in
+$(srcdir)/autoconf.1:   $(common_dep) $(binsrcdir)/autoconf.as
+$(srcdir)/autoheader.1: $(common_dep) $(binsrcdir)/autoheader.in
+$(srcdir)/autom4te.1:   $(common_dep) $(binsrcdir)/autom4te.in
+$(srcdir)/autoreconf.1: $(common_dep) $(binsrcdir)/autoreconf.in
+$(srcdir)/autoscan.1:   $(common_dep) $(binsrcdir)/autoscan.in
+$(srcdir)/autoupdate.1: $(common_dep) $(binsrcdir)/autoupdate.in
+$(srcdir)/ifnames.1:    $(common_dep) $(binsrcdir)/ifnames.in
 
 # Independent from this package.
-config.guess.1: $(top_srcdir)/config/config.guess
-config.sub.1:   $(top_srcdir)/config/config.sub
+$(srcdir)/config.guess.1: $(top_srcdir)/config/config.guess
+$(srcdir)/config.sub.1:   $(top_srcdir)/config/config.sub
 
 SUFFIXES = .x .1
 
 .x.1:
        echo "Updating man page $@"
        
PATH="$(top_builddir)/address@hidden@$(top_srcdir)/address@hidden@$$PATH"; \
        export PATH; \
        $(HELP2MAN) \
-           --include=$(srcdir)/$*.x \
+           --include=$*.x \
            --include=$(srcdir)/common.x \
-           --output=$@ $*
+           --output=$@ `echo "$*" | sed 's,^$(srcdir)/,,'`




reply via email to

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