automake
[Top][All Lists]
Advanced

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

Re: adding rules to Makefile.am


From: Ralf Wildenhues
Subject: Re: adding rules to Makefile.am
Date: Sat, 21 Jan 2006 17:27:34 +0100
User-agent: Mutt/1.5.9i

Hi Bob,

* Bob Rossi wrote on Sat, Jan 21, 2006 at 04:00:20PM CET:
> 
> I've been working on my documentation for CGDB lately, and found a nifty 
> program called help2man which generates a simple man page. It looks at the
> output of both 'cgdb --version' and 'cgdb --help'. Parses the output,
> and generates a man page.

> One problem is, if the file usage.c is modified, then I have to set a
> flag somewhere to tell me that I need to run help2man. However, I can't
> run help2man until after the entire build is done. (CGDB needs to be
> linked in order to run it.)

The Autoconf sources do something similar, except they run `$program
--help' always, but update the manpage only if the output changed.
Unless startup of your program is very expensive, you could just look at
how they did that in autoconf/man/Makefile.am.

Otherwise, you should be able to add a dependency to
$(srcdir)/../src/usage.c in the doc/Makefile.am rule to update the
manpage, if that rule is not a suffix rule.

Cheers,
Ralf




reply via email to

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