automake
[Top][All Lists]
Advanced

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

Re: help2man & help2texi??


From: Bruce Korb
Subject: Re: help2man & help2texi??
Date: Sun, 05 Feb 2006 07:33:08 -0800
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)


Thanks for the vote of confidence, Harlan.  The question
unanswered, tho, is, "Why bother?"

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)

[[[Don't leave off the dependency on the executable.]]]

The answer is:  the same reason for using usage.c as your "original
source" for usage infomation.  You only want to write that stuff once
and have that information flow through to the other places where you
need it.  The drawback to "usage.c" as the original source is its
clumsiness in the "flow through" part.  You must build your executable
and be sure to emit your usage text in a way that "help2man" can
readily understand, then all you get is a cheepy man page.

AutoOpts (AutoGen) derives the "usage.c" from the option description file,
as well as "program.1" and "invoke-program.texi".  (You do have a texinfo
manual, yes?)  Additionally, the parsing library ("libopts") parses
".rc" (".ini") files and environment variables:

  http://www.gnu.org/software/autogen/autoopts.html
  http://www.gnu.org/software/autogen/compare.html

And, if you don't want all those easily obtainable features because you
don't want to be bothered with relying on "libopts" having been installed
and you don't want to incorporate that library into your package:

  http://www.gnu.org/software/autogen/blocksort.html#REDISTRIBUTE

then, generate the "getopt(3C)" or "getopt_long(3GNU)" code:

  http://www.gnu.org/software/autogen/manual/html_node/autogen_292.html#SEC292

(valid link as of 5 Feb 2006).  Of course, environment variable and .rc file
presets go away....

Cheers :-)  -- Bruce




reply via email to

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