From: Ralf Wildenhues Date: Sat, 20 Sep 2008 09:42:31 +0000 (+0200) Subject: Man pages for automake and aclocal. X-Git-Tag: v1.10b~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e32096193cfdff5a7e93bba8947c2641e13d8ff7;p=thirdparty%2Fautomake.git Man pages for automake and aclocal. * configure.ac (HELP2MAN): New substitution. * doc/Makefile.am (dist_man1_MANS, MAINTAINERCLEANFILES) (update_mans): New macros. ($(srcdir)/aclocal-$(APIVERSION).1) ($(srcdir)/automake-$(APIVERSION).1): New rules, generate man pages from the command line help with help2man. ($(srcdir)/aclocal.1, $(srcdir)/automake.1): New rules, for `.so' man page links to the versioned pages. * NEWS: Update. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 8dfc89318..f48127470 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-09-20 Ralf Wildenhues + + Man pages for automake and aclocal. + * configure.ac (HELP2MAN): New substitution. + * doc/Makefile.am (dist_man1_MANS, MAINTAINERCLEANFILES) + (update_mans): New macros. + ($(srcdir)/aclocal-$(APIVERSION).1) + ($(srcdir)/automake-$(APIVERSION).1): New rules, generate + man pages from the command line help with help2man. + ($(srcdir)/aclocal.1, $(srcdir)/automake.1): New rules, for + `.so' man page links to the versioned pages. + * NEWS: Update. + 2008-09-13 Ralf Wildenhues Faster install for libtool outputs. diff --git a/Makefile.in b/Makefile.in index 1a33103db..e29956ea4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -141,6 +141,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ FGREP = @FGREP@ GREP = @GREP@ +HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff --git a/NEWS b/NEWS index a2b336ea6..dac6a9ec2 100644 --- a/NEWS +++ b/NEWS @@ -43,6 +43,8 @@ New in 1.10a: Note that Automake will never overwrite an existing COPYING file, even when the `--force-missing' option is used. + - Automake ships and install man pages for automake and aclocal now. + - New shorthand `$(pkglibexecdir)' for `$(libexecdir)/@PACKAGE@'. - install-sh supports -C, which does not update the installed file diff --git a/configure b/configure index d7591c2ad..235f1a0ba 100755 --- a/configure +++ b/configure @@ -608,6 +608,7 @@ EGREP GREP MODIFICATION_DELAY LN +HELP2MAN TEX PERL pkgvdatadir @@ -2416,6 +2417,11 @@ fi +# Generate man pages. + +HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"} + + # Test for Autoconf. We run Autoconf in a subdirectory to ease # deletion of any files created (such as those added to # autom4te.cache). We used to perform only the last of the three diff --git a/configure.ac b/configure.ac index 08e9f414f..a21bfb286 100644 --- a/configure.ac +++ b/configure.ac @@ -63,6 +63,9 @@ installed, select the one Automake should use using # The test suite will skip some tests if tex is absent. AC_CHECK_PROG([TEX], [tex], [tex]) +# Generate man pages. +AM_MISSING_PROG([HELP2MAN], [help2man]) + # Test for Autoconf. We run Autoconf in a subdirectory to ease # deletion of any files created (such as those added to # autom4te.cache). We used to perform only the last of the three diff --git a/doc/.gitignore b/doc/.gitignore index 259d9f613..2554ab9cd 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,6 +1,8 @@ amhello-*.tar.gz automake.info automake.info-[0-9] +automake*.1 +aclocal*.1 stamp-vti version.texi automake.ac diff --git a/doc/Makefile.am b/doc/Makefile.am index 11e86e717..c6d200ffc 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -2,7 +2,7 @@ ## Makefile for Automake. -## Copyright (C) 2003, 2006 Free Software Foundation, Inc. +## Copyright (C) 2003, 2006, 2008 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 @@ -20,6 +20,24 @@ info_TEXINFOS = automake.texi automake_TEXINFOS = fdl.texi +dist_man1_MANS = \ + $(srcdir)/aclocal.1 \ + $(srcdir)/automake.1 \ + $(srcdir)/aclocal-$(APIVERSION).1 \ + $(srcdir)/automake-$(APIVERSION).1 +MAINTAINERCLEANFILES = $(dist_man1_MANS) +update_mans = \ + PATH=..$(PATH_SEPARATOR)$$PATH; export PATH; \ + $(HELP2MAN) --output=$@ +$(dist_man1_MANS): $(top_srcdir)/configure.ac +$(srcdir)/aclocal.1 $(srcdir)/automake.1: + f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'`; \ + echo ".so man1/$$f-$(APIVERSION).1" > $@ +$(srcdir)/aclocal-$(APIVERSION).1: $(srcdir)/../aclocal.in + $(update_mans) aclocal +$(srcdir)/automake-$(APIVERSION).1: $(srcdir)/../automake.in + $(update_mans) automake + # The following requires a fixed version of the Emacs 19.30 etags. ETAGS_ARGS = --lang=none \ --regex='/^@node[ \t]+\([^,]+\)/\1/' $(srcdir)/automake.texi diff --git a/doc/Makefile.in b/doc/Makefile.in index 9fafd09ea..d4e4f1444 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -33,7 +33,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ subdir = doc -DIST_COMMON = $(automake_TEXINFOS) $(dist_doc_DATA) \ +DIST_COMMON = $(automake_TEXINFOS) $(dist_doc_DATA) $(dist_man1_MANS) \ $(dist_noinst_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/stamp-vti \ $(srcdir)/version.texi @@ -66,7 +66,8 @@ TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips -am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(docdir)" +am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(docdir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -88,6 +89,9 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(dist_man1_MANS) dist_docDATA_INSTALL = $(INSTALL_DATA) DATA = $(dist_doc_DATA) $(dist_noinst_DATA) ETAGS = etags @@ -108,6 +112,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ FGREP = @FGREP@ GREP = @GREP@ +HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -180,6 +185,17 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ info_TEXINFOS = automake.texi automake_TEXINFOS = fdl.texi +dist_man1_MANS = \ + $(srcdir)/aclocal.1 \ + $(srcdir)/automake.1 \ + $(srcdir)/aclocal-$(APIVERSION).1 \ + $(srcdir)/automake-$(APIVERSION).1 + +MAINTAINERCLEANFILES = $(dist_man1_MANS) +update_mans = \ + PATH=..$(PATH_SEPARATOR)$$PATH; export PATH; \ + $(HELP2MAN) --output=$@ + # The following requires a fixed version of the Emacs 19.30 etags. ETAGS_ARGS = --lang=none \ @@ -400,6 +416,40 @@ maintainer-clean-aminfo: echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done +install-man1: $(dist_man1_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list='$(dist_man1_MANS)'; \ + { for i in $$list; do echo "$$i"; done; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(dist_man1_MANS)'; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files install-dist_docDATA: $(dist_doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @@ -503,9 +553,9 @@ distdir: $(DISTFILES) dist-info check-am: all-am check: check-am -all-am: Makefile $(INFO_DEPS) $(DATA) +all-am: Makefile $(INFO_DEPS) $(MANS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(docdir)"; do \ + for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -533,6 +583,7 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic mostlyclean-am @@ -553,7 +604,7 @@ info: info-am info-am: $(INFO_DEPS) -install-data-am: install-dist_docDATA install-info-am +install-data-am: install-dist_docDATA install-info-am install-man install-dvi: install-dvi-am @@ -625,7 +676,7 @@ install-info-am: $(INFO_DEPS) install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi -install-man: +install-man: install-man1 install-pdf: install-pdf-am @@ -671,8 +722,10 @@ ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-dist_docDATA uninstall-dvi-am \ - uninstall-html-am uninstall-info-am uninstall-pdf-am \ - uninstall-ps-am + uninstall-html-am uninstall-info-am uninstall-man \ + uninstall-pdf-am uninstall-ps-am + +uninstall-man: uninstall-man1 .MAKE: install-am install-strip @@ -682,15 +735,24 @@ uninstall-am: uninstall-dist_docDATA uninstall-dvi-am \ install-am install-data install-data-am install-dist_docDATA \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ + install-man install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean \ mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \ pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-dist_docDATA uninstall-dvi-am uninstall-html-am \ - uninstall-info-am uninstall-pdf-am uninstall-ps-am - + uninstall-info-am uninstall-man uninstall-man1 \ + uninstall-pdf-am uninstall-ps-am + +$(dist_man1_MANS): $(top_srcdir)/configure.ac +$(srcdir)/aclocal.1 $(srcdir)/automake.1: + f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'`; \ + echo ".so man1/$$f-$(APIVERSION).1" > $@ +$(srcdir)/aclocal-$(APIVERSION).1: $(srcdir)/../aclocal.in + $(update_mans) aclocal +$(srcdir)/automake-$(APIVERSION).1: $(srcdir)/../automake.in + $(update_mans) automake # We depend on configure.ac so that we regenerate the tarball # whenever the Automake version changes. diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index 09a0e26e6..29975cee5 100644 --- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -129,6 +129,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ FGREP = @FGREP@ GREP = @GREP@ +HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index 32cfdd93c..43bbe90ed 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -80,6 +80,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ FGREP = @FGREP@ GREP = @GREP@ +HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff --git a/lib/Makefile.in b/lib/Makefile.in index e707e490c..cab22edb8 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -132,6 +132,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ FGREP = @FGREP@ GREP = @GREP@ +HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in index dc888fd22..1717f2740 100644 --- a/lib/am/Makefile.in +++ b/lib/am/Makefile.in @@ -91,6 +91,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ FGREP = @FGREP@ GREP = @GREP@ +HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff --git a/m4/Makefile.in b/m4/Makefile.in index e8a9da75d..6aff285aa 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -91,6 +91,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ FGREP = @FGREP@ GREP = @GREP@ +HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff --git a/tests/Makefile.in b/tests/Makefile.in index bac93825e..1d9053616 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -81,6 +81,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ FGREP = @FGREP@ GREP = @GREP@ +HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@