automake
[Top][All Lists]
Advanced

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

Re: help2man


From: Bob Rossi
Subject: Re: help2man
Date: Sun, 5 Feb 2006 08:39:44 -0500
User-agent: Mutt/1.5.9i

On Sun, Feb 05, 2006 at 06:53:28AM +0100, Alexandre Duret-Lutz wrote:
> >>> "BR" == Bob Rossi <address@hidden> writes:
> 
>  BR> My doc directory is built after all others. I was thinking I could have
>  BR> a rule in the doc directory that would run help2man if usage.c has
>  BR> changed. However, if usage.c was changed, by this point, the usage.o has
>  BR> already been built, so I don't know how I would be able to determine I
>  BR> need to run this command.
> 
> I don't understand your problem with usage.o; why would we care
> about usage.o?  You need to rebuild cgdb.1 whenever usage.c is
> newer than cgdb.1.  And since the version can probably be
> changed without modifying usage.c, e.g., by changing
> configure.ac, you also need to rebuild cgdb.1 whenever
> configure.ac is newer.
> 
>  BR> Also, I did read this:
>  BR> http://www.gnu.org/software/automake/manual/html_mono/automake.html
>  BR> section: "Files left in build directory after distclean"
> 
> I think this shows all you need.  Adjusted to you case it would
> probably give
> 
>      dist_man_MANS = cgdb.1
> 
>      cgdb.1: $(top_srcdir)/src/usage.c $(top_srcdir)/configure.ac
>              cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) cgdb$(EXEEXT)
>              help2man --output=$@ $(top_builddir)/src/foo$(EXEEXT)

Just so this can be documented, this did work for me.
  dist_man_MANS = cgdb.1
  # Autogenerate the man page using help2man. This happens whenever the
  # user modifies either configure.in or usage.c, which contains CGDB's usage.
  cgdb.1: $(top_srcdir)/cgdb/src/usage.c $(top_srcdir)/configure.in
    help2man --output=$(top_srcdir)/doc/cgdb.1 
$(top_builddir)/cgdb/src/cgdb$(EXEEXT)

The only thing that bothered me was that the documentation said that
CGDB could no longer be cross compiled. I've never cross compiled CGDB.
However, if someone does complain, I'll probably have to remove this 
rule from the Makefile.


I have 2 other suggestions for the manual. It would probably be good to
suggest to the user to move there usage function to a file of it's own,
to reduce the possibility of needing help2man.

Second, and this might be an autoconf question, but is there a way to
put the AM_INIT_AUTOMAKE(cgdb, 0.6.0) macro in a separate configure.in
of it's own? That way, most likely only the person doing a release will
need help2man installed. If there is, this might be worth documenting as
a suggestion also.

Thanks,
Bob Rossi




reply via email to

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