1GETDEFS(1)                    Programmer's Manual                   GETDEFS(1)
2
3
4

NAME

6       getdefs - AutoGen Definition Extraction Tool
7

SYNOPSIS

9       getdefs [opt-name[=value]]...
10
11       All arguments are named options.
12
13       If  no input argument is provided or is set to simply "-", and if stdin
14       is not a tty, then the list of input files will be read from stdin.
15

DESCRIPTION

17       This manual page briefly documents the getdefs command.   This  program
18       extracts  AutoGen definitions from a list of source files.  Definitions
19       are delimited by "/*=<entry-type> <entry-name>0 and "=*/0.  From  that,
20       this program creates a definition of the following form:
21
22           #line nnn "source-file-name"
23           entry_type = {
24               name = entry_name;
25               ...
26           };
27
28       The  ellipsis  `...'  is filled in by text found between the two delim‐
29       iters, with everything up  through  the  first  sequence  of  asterisks
30       deleted on every line.  Additionally, if the `<entry-name>' is followed
31       by a comma, the word `ifdef' (or `ifndef') and a name  `if_name',  then
32       the above entry will appear as:
33
34           #ifdef if_name
35           #line nnn "source-file-name"
36           entry_type = {
37               name = entry_name;
38               ...
39           };
40           #endif
41
42       There are two special “entry types”:
43
44       *   The entry_type enclosure and the name entry will be omitted
45           and the ellipsis will become top-level definitions.
46
47       --  The contents of the comment must be a single getdefs option.
48           The option name must follow the double hyphen and its argument
49           will be everything following the name.  This is intended for use
50           with the subblock and listattr options.
51

OPTIONS

53       defs-to-get=reg-ex
54              Regexp to look for after the "/*=".
55
56              If you want definitions only from a particular category, or even
57              with names matching particular patterns, then specify this regu‐
58              lar expression for the text that must follow the /*=.
59
60       ordering[=file-name], no-ordering
61              Alphabetize or use named file.  The no-ordering form will dis‐
62              able the option.  This option is enabled by default.
63
64              By default, ordering is alphabetical by the entry name.  Use,
65              no-ordering if order is unimportant.  Use ordering with no argu‐
66              ment to order without case sensitivity.  Use ordering=<file-
67              name> if chronological order is important.  getdefs will main‐
68              tain the text content of file-name.  file-name need not exist.
69
70       first-index=first-index
71              The first index to apply to groups.  This option takes an inte‐
72              ger number as its argument.  The default first-index for this
73              option is:
74                   0
75
76              By default, the first occurrence of a named definition will have
77              an index of zero.  Sometimes, that needs to be a reserved value.
78              Provide this option to specify a different starting point.
79
80       input=src-file
81              Input file to search for defs.  This option may appear an unlim‐
82              ited number of times.  This option is the default option.
83
84              All files that are to be searched for definitions must be named
85              on the command line or read from stdin.  If there is only one
86              input option and it is the string, "-", then the input file list
87              is read from stdin.  If a command line argument is not an option
88              name and does not contain an assignment operator (=), then it
89              defaults to being an input file name.  At least one input file
90              must be specified.
91
92       subblock=sub-def
93              subblock definition names.  This option may appear an unlimited
94              number of times.
95
96              This option is used to create shorthand entries for nested defi‐
97              nitions.  For example, with:
98
99              using subblock thus --subblock=arg=argname,type,null
100
101              and defining an arg thus arg: this, char *
102
103              will then expand to: arg = { argname = this; type = "char *";
104              @;}
105              The "this, char *" string is separated at the commas, with the
106              white space removed.  You may use characters other than commas
107              by starting the value string with a punctuation character other
108              than a single or double quote character.  You may also omit
109              intermediate values by placing the commas next to each other
110              with no intervening white space.  For example, "+mumble++yes+"
111              will expand to:
112              arg = { argname = mumble; null = "yes"; @;}.
113
114       listattr=def
115              attribute with list of values.  This option may appear an unlim‐
116              ited number of times.
117
118              This option is used to create shorthand entries for definitions
119              that generally appear several times.  That is, they tend to be a
120              list of values.  For example, with:
121              listattr=foo defined, the text:
122              foo: this, is, a, multi-list will then expand to:
123              foo = 'this', 'is', 'a', 'multi-list';
124              The texts are separated by the commas, with the white space
125              removed.  You may use characters other than commas by starting
126              the value string with a punctuation character other than a sin‐
127              gle or double quote character.
128
129       filelist[=file]
130              Insert source file names into defs.
131
132              Inserts the name of each input file into the output definitions.
133              If no argument is supplied, the format will be:
134                  infile = '%s';
135              If an argument is supplied, that string will be used for the
136              entry name instead of infile.
137
138   Definition insertion options
139       assign=ag-def
140              Global assignments.  This option may appear an unlimited number
141              of times.
142
143              The argument to each copy of this option will be inserted into
144              the output definitions, with only a semicolon attached.
145
146       common-assign=ag-def
147              Assignments common to all blocks.  This option may appear an
148              unlimited number of times.
149
150              The argument to each copy of this option will be inserted into
151              each output definition, with only a semicolon attached.
152
153       copy=file
154              File(s) to copy into definitions.  This option may appear an
155              unlimited number of times.
156
157              The content of each file named by these options will be inserted
158              into the output definitions.
159
160       srcfile[=file]
161              Insert source file name into each def.
162
163              Inserts the name of the input file where a definition was found
164              into the output definition.  If no argument is supplied, the
165              format will be:
166                  srcfile = '%s';
167              If an argument is supplied, that string will be used for the
168              entry name instead of srcfile.
169
170       linenum[=def-name]
171              Insert source line number into each def.
172
173              Inserts the line number in the input file where a definition was
174              found into the output definition.  If no argument is supplied,
175              the format will be:
176                  linenum = '%s';
177              If an argument is supplied, that string will be used for the
178              entry name instead of linenum.
179
180   Definition output disposition options:
181       output=file
182              Output file to open.  This option is a member of the autogen
183              class of options.
184
185              If you are not sending the output to an AutoGen process, you may
186              name an output file instead.
187
188       autogen[=ag-cmd], no-autogen
189              Invoke AutoGen with defs.  The no-autogen form will disable the
190              option.  This option is enabled by default.  This option is a
191              member of the autogen class of options.
192
193              This is the default output mode.  Specifying no-autogen is
194              equivalent to output=-.  If you supply an argument to this
195              option, that program will be started as if it were AutoGen and
196              its standard in will be set to the output definitions of this
197              program.
198
199       template=file
200              Template Name.
201
202              Specifies the template name to be used for generating the final
203              output.
204
205       agarg=ag-opt
206              AutoGen Argument.  This option may appear an unlimited number of
207              times.  This option must not appear in combination with any of
208              the following options: output.
209
210              This is a pass-through argument.  It allows you to specify any
211              arbitrary argument to be passed to AutoGen.
212
213       base-name=name
214              Base name for output file(s).  This option must not appear in
215              combination with any of the following options: output.
216
217              When output is going to AutoGen, a base name must either be sup‐
218              plied or derived.  If this option is not supplied, then it is
219              taken from the template option.  If that is not provided either,
220              then it is set to the base name of the current directory.
221
222       help   Display usage information and exit.
223
224       more-help
225              Extended usage information passed thru pager.
226
227       save-opts[=rcfile]
228              Save the option state to rcfile.  The default is the last con‐
229              figuration file listed in the OPTION PRESETS section, below.
230
231       load-opts=rcfile, --no-load-opts
232              Load options from rcfile.  The no-load-opts form will disable
233              the loading of earlier RC/INI files.  --no-load-opts is handled
234              early, out of order.
235
236       version[={v|c|n}]
237              Output version of program and exit.  The default mode is `v', a
238              simple version.  The `c' mode will print copyright information
239              and `n' will print the full copyright notice.
240

OPTION PRESETS

242       Any option that is not marked as not presettable may be preset by load‐
243       ing values from configuration ("RC" or ".INI") file(s).  The homerc
244       file is "/dev/null", unless that is a directory.  In that case, the
245       file ".getdefsrc" is searched for within that directory.
246

SEE ALSO

248       This program is documented more fully in the Getdefs section of the
249       Add-On chapter in the AutoGen Info system documentation.
250

AUTHOR

252       Bruce Korb
253       Please send bug reports to:  autogen-users@lists.sourceforge.net
254
255
256       Released under the GNU General Public License.
257
258       This manual page was AutoGen-erated from the getdefs option defini‐
259       tions.
260
261
262
263(GNU AutoGen 1.4)                 2009-08-10                        GETDEFS(1)
Impressum