1getdefs(1)                       User Commands                      getdefs(1)
2
3
4

NAME

6       getdefs - AutoGen Definition Extraction Tool
7

SYNOPSIS

9       getdefs [option-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 program extracts AutoGen definitions from a list of source  files.
18       Definitions   are  delimited  by  /*=<entry-type>  <entry-name>0fP  and
19       =*/0fP.
20

OPTIONS

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

OPTION PRESETS

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

FILES

221       See OPTION PRESETS for configuration files.
222

EXIT STATUS

224       One of the following exit values will be returned:
225
226       0  (EXIT_SUCCESS)
227              Successful program execution.
228
229       1  (EXIT_FAILURE)
230              The operation failed or the command syntax was not valid.
231
232       2  (EXIT_INVALID_INPUT)
233              An input file was specified that is not a file
234
235       3  (EXIT_NO_MEM)
236              Insufficient memory for operation
237
238       66  (EX_NOINPUT)
239              A specified configuration file could not be loaded.
240
241       70  (EX_SOFTWARE)
242              libopts had an internal operational error.  Please report it  to
243              autogen-users@lists.sourceforge.net.  Thank you.
244

SEE ALSO

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

AUTHORS

250       Bruce Korb
251
253       Copyright (C) 1999-2018 Bruce Korb all rights reserved.   This  program
254       is  released under the terms of the GNU General Public License, version
255       3 or later.
256

BUGS

258       Please send bug reports to: autogen-users@lists.sourceforge.net
259

NOTES

261       This manual page was AutoGen-erated from  the  getdefs  option  defini‐
262       tions.
263
264
265
266GNU AutoGen (1.5)                 24 Jul 2019                       getdefs(1)
Impressum