That template can be used for creating code that uses getopt() and/or 
getopt_long().
However, to do that, that template must compile and run a small program.
I have added some clarification to its documentation:

> @strong{PLEASE NOTE}: in processing the option definitions to produce
> the usage text, it is necessary to compile some generated code in a
> temporary directory.  That means that all the include directories
> needed to compile the code must be full path names and not relative
> directory names.  ``.'' is a relative directory name.  To specify
> ``-I.'' in the @code{CFLAGS} environment variable, you must expand it.
> For example, use:
>
> @example
> CFLAGS=-I`pwd`
> @end example

Also, I seem to have lost the email I was looking at earlier.
Someone sent me a "test3.zip" file and a patch to alter gettext.tpl.
It has completely disappeared.  No trace anywhere.

Anyway, the mod essentially added an extra layer of evaluation of CFLAGS
so that some extra quoting got stripped off of a command line
define for an include file name.  I cannot exactly do that.
I'd recommend sedding a wrapper header that you always include instead.
e.g.:

     sed 's/@@MARKER@@/$(FILE_NAME)/' test-wrap.h.in > test-wrap.h ; \
     autogen -T getopt.tpl test.def

where the compilation of test.c needs to include $(FILE_NAME).
That will simplify all the layers of quoting required by the shell
and autogen and the C compiler.  It gets confusing, but I think I
chased it to that cause.

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Autogen-users mailing list
Autogen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/autogen-users

Reply via email to