help-gnu-utils
[Top][All Lists]
Advanced

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

Autoconf + Gengetopt


From: R. Biloti
Subject: Autoconf + Gengetopt
Date: 22 Jul 2005 11:22:11 -0700
User-agent: G2/0.2

Hi Folks

I used to use gengetopt
(http://www.gnu.org/software/gengetopt/gengetopt.html) to parse command
line options to my softwares. Briefly, I had to write a option
descriptor file, app.ggo for example, and, with gengetopt, it is
translated into two file (cmdline.c and cmdline.h) which actually
implements the parser. The syntax is just
gengetopt -f cmdline < app.ggo

I'm new to this autoconf/automake stuff. How should I code a macro to
autoconf/automake so that it takes care of this? I mean, I would like
to define in Makefile.am something like

prog_SOURCES = prog.c app.ggo

and it automagically generates a Makefile that knows how to run
gengetopt to yield cmdline.c and cmdline.h as well as compile/link them
properly. Note that I would like that cmdline.c and cmdline.h were
included in the distribution package.

Thanks,
Ricardo Biloti.



reply via email to

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