Man pages for automake and aclocal.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Man pages for automake and aclocal.

Ralf Wildenhues
While adding man pages to Libtool, let's do it for Automake, too.
I hope letting the unversioned man pages be .so links helps distributors
sort out versioning issues.

Cheers,
Ralf

    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 <[hidden email]>

diff --git a/NEWS b/NEWS
index a2b336e..dac6a9e 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.ac b/configure.ac
index 08e9f41..a21bfb2 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/Makefile.am b/doc/Makefile.am
index 11e86e7..c6d200f 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


Reply | Threaded
Open this post in threaded view
|

Re: Man pages for automake and aclocal.

Eric Blake
Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:

>
> While adding man pages to Libtool, let's do it for Automake, too.
> I hope letting the unversioned man pages be .so links helps distributors
> sort out versioning issues.

I'm now seeing this trying to bootstrap automake.git on a Solaris 10 box:

make[1]: Entering directory `/export/home/ericb/automake/doc'
PATH=..:$PATH; export PATH; /bin/bash /export/home/ericb/automake/lib/missing
--run help2man --output=aclocal-1.10a.1 aclocal
help2man: can't get `--help' info from aclocal
make[1]: *** [aclocal-1.10a.1] Error 1

On further investigation, ./aclocal yields:

./aclocal --help
Can't locate Automake/Config.pm in @INC (@INC contains:
/export/home/ericb/share/automake-1.10a /usr/perl5/5.8.4/lib/sun4-solaris-64int
/usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4/sun4-solaris-64int
/usr/perl5/site_perl/5.8.4 /usr/perl5/site_perl
/usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int /usr/perl5/vendor_perl/5.8.4
/usr/perl5/vendor_perl .) at ./aclocal line 37.
BEGIN failed--compilation aborted at ./aclocal line 37.

--
Eric Blake




Reply | Threaded
Open this post in threaded view
|

Re: Man pages for automake and aclocal.

Ralf Wildenhues
Hi Eric,

* Eric Blake wrote on Sat, Sep 20, 2008 at 11:28:47PM CEST:
> Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:
> >
> > While adding man pages to Libtool, let's do it for Automake, too.

> I'm now seeing this trying to bootstrap automake.git on a Solaris 10 box:
>
> make[1]: Entering directory `/export/home/ericb/automake/doc'
> PATH=..:$PATH; export PATH; /bin/bash /export/home/ericb/automake/lib/missing
> --run help2man --output=aclocal-1.10a.1 aclocal
> help2man: can't get `--help' info from aclocal

> ./aclocal --help
> Can't locate Automake/Config.pm in @INC (@INC contains:

D'oh.  Thanks for the report!  Fixed like this.

Cheers,
Ralf

    Fix man page creation without installed files.
   
    * doc/Makefile.am (update_mans): Use wrappers in tests/
    directory.
    ($(srcdir)/aclocal-$(APIVERSION).1): Use versioned wrapper as
    input program to help2man.
    ($(srcdir)/automake-$(APIVERSION).1): Likewise.
    Report by Eric Blake.
   
    Signed-off-by: Ralf Wildenhues <[hidden email]>

diff --git a/doc/Makefile.am b/doc/Makefile.am
index c6d200f..0a2a076 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -27,16 +27,17 @@ dist_man1_MANS = \
   $(srcdir)/automake-$(APIVERSION).1
 MAINTAINERCLEANFILES = $(dist_man1_MANS)
 update_mans = \
-  PATH=..$(PATH_SEPARATOR)$$PATH; export PATH; \
+  PATH="`pwd`/../tests$(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
+ $(update_mans) aclocal-$(APIVERSION)
 $(srcdir)/automake-$(APIVERSION).1: $(srcdir)/../automake.in
- $(update_mans) automake
+ $(update_mans) automake-$(APIVERSION)
 
 # The following requires a fixed version of the Emacs 19.30 etags.
 ETAGS_ARGS = --lang=none \