summaryrefslogtreecommitdiff
path: root/autoopts/tpl/stdoptions.def
blob: f04fd5b5f23a93260110a1824870c70b8fb1479b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345

/* -*- Mode: Text -*-
 *
 * Time-stamp:      "2013-03-10 07:50:01 bkorb"
 *
 *  This file is part of AutoOpts, a companion to AutoGen.
 *  AutoOpts is free software.
 *  AutoOpts is Copyright (c) 1992-2012 by Bruce Korb - all rights reserved
 *
 *  AutoOpts is available under any one of two licenses.  The license
 *  in use must be one of these two and the choice is under the control
 *  of the user of the license.
 *
 *   The GNU Lesser General Public License, version 3 or later
 *      See the files "COPYING.lgplv3" and "COPYING.gplv3"
 *
 *   The Modified Berkeley Software Distribution License
 *      See the file "COPYING.mbsd"
 *
 *  These files have the following md5sums:
 *
 *  43b91e8ca915626ed3818ffb1b71248b COPYING.gplv3
 *  06a1a2e4760c90ea5e1dad8dfaac4d39 COPYING.lgplv3
 *  66a5cedaf62c4b2637025f049f9b826f COPYING.mbsd
 */

#ifndef NO_STD_OPT_DOC
# ifndef HAVE_STD_OPT_DOC
#   define HAVE_STD_OPT_DOC 1
flag = {
    name        = autoopts_std_options;
    documentation;
    descrip = <<- _EOF_
	The following options are commonly used and are
	provided and supported by AutoOpts
	_EOF_;
};
# endif
#endif

#ifdef  ALL_STD_OPTS
#define BRIEF
#define DEBUG
#define DIRECTORY
#define DRY_RUN
#define INPUT
#define INTERACTIVE
#define OUTPUT
#define QUIET
#define SILENT
#define VERBOSE
#define WARN
#endif

#ifdef ALL_FLAG_OPTS
#define BRIEF_FLAG
#define DEBUG_FLAG
#define DIRECTORY_FLAG
#define DRY_RUN_FLAG
#define INPUT_FLAG
#define INTERACTIVE_FLAG
#define OUTPUT_FLAG
#define QUIET_FLAG
#define SILENT_FLAG
#define VERBOSE_FLAG
#define WARN_FLAG
#endif

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *
 *  Levels of user entertainment
 *
 *  DEBUG output
 */
#ifdef  DEBUG_FLAG
#define DEBUG
#endif

#ifdef DEBUG
flag = {
    name    = DEBUG;
#ifdef DEBUG_FLAG
    value   = D;
#endif
#ifdef DEBUG_LEVEL
    arg-type = number;
#endif
    descrip = 'run program with debugging info';
    doc =
    "Specifying this option will cause the program to display debugging\n"
    "information.  The information should be helpful to a developer in\n"
    "debugging this program.";
};
#endif

/* * * * * * * *
 *
 *  VERBOSE output
 */
#ifdef  VERBOSE_FLAG
#define VERBOSE 1
#endif

#ifdef VERBOSE
flag = {
    name    = verbose;
#ifdef VERBOSE_FLAG
    value   = V;
#endif
#ifdef VERBOSE_LEVEL
    arg-type = number;
#endif
#ifdef VERBOSE_ENUM
    arg-type = keyword;
    keyword  = silent, quiet, brief, informative, verbose;
    arg-default = brief;
#endif
    descrip = 'run program with progress info';
    doc =
    "Specifying this option will cause the program to display lots of\n"
    "progress information.  You will be able to see that the program\n"
    "is working and it may help you debug your use of the tool.";
};
#endif

/* * * * * * * *
 *
 *  WARNING output
 */
#ifdef WARN_LEVEL
#define WARN
#endif
#ifdef  WARN_FLAG
#define WARN
#endif

#ifdef WARN
flag = {
    name    = warn;
#ifdef WARN_FLAG
    value   = w;
#endif
#ifdef WARN_LEVEL
    arg-type = number;
    descrip  = 'specify a warning-level threshhold';
    disable  = no;
    doc =
    "Specifying this option will allow you to specify the warning level\n"
    "for the messages you want to see.  `--no-warn' will disable\n"
    "warnings entirely.";
#else
    descrip  = 'disable warning output';
    doc =
    "Specifying this option will cause the program to disable\n"
    "warning messages.";
#endif
};
#endif

/* * * * * * * *
 *
 *  BRIEF output
 */
#ifdef  BRIEF_FLAG
#define BRIEF
#endif

#ifdef BRIEF
flag = {
    name    = brief;
#ifdef BRIEF_FLAG
    value   = b;
#endif
    descrip = 'run with minimal info output';
    doc =
    "Specifying this option will cause the program to disable most progress\n"
    "information.";
};
#endif

/* * * * * * * *
 *
 *  QUIET/SILENT output
 */
#ifdef  QUIET_FLAG
#define QUIET
#endif
#ifdef  SILENT_FLAG
#define SILENT
#endif

#ifdef QUIET_SILENT
#define QUIET
#define SILENT
#else

#ifdef QUIET
#ifdef SILENT
#define QUIET_SILENT
#endif
#endif
#endif

#ifdef QUIET
flag = {
    name    = quiet;
#ifdef QUIET_FLAG
    value   = q;
#endif
#ifdef QUIET_SILENT
    equivalence = quiet;
#endif
#ifdef QUIET_LEVEL
    arg-type = number;
#endif
    descrip = 'run without unnecessary output';
    doc =
    "Specifying this option will cause the program to disable progress\n"
    "information.";
};
#endif

#ifdef SILENT
flag = {
    name    = silent;
#ifdef SILENT_FLAG
    value   = s;
#endif
#ifdef QUIET_SILENT
    equivalence = quiet;
#endif
#ifdef SILENT_LEVEL
    arg-type = number;
#endif
    descrip = 'run without unnecessary output';
    doc =
    "Specifying this option will cause the program to disable progress\n"
    "information.";
};
#endif

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *
 *  Operational mode
 *
 *  DRY_RUN
 */
#ifdef  DRY_RUN_FLAG
#define DRY_RUN
#endif

#ifdef DRY_RUN
flag = {
    name    = DRY_RUN;
#ifdef DRY_RUN_FLAG
    value   = R;
#endif
    descrip = 'program will make no changes';
    doc =
    "Specifying this option will cause the program to run without\n"
    "altering any of the normal output files.  Instead, it will\n"
    "display what it would otherwise have done.";
};
#endif

/* * * * * * * *
 *
 *  INTERACTIVE OPERATION
 */
#ifdef INTERACTIVE_FLAG
#define INTERACTIVE
#endif

#ifdef INTERACTIVE
flag = {
    name      = interactive;
    arg-type  = string;
#ifdef INTERACTIVE_FLAG
    value     = I;        /* flag style option character */
#endif
    descrip   = "prompt for confirmation";
    doc =
    "Specifying this option will cause the program to query you for\n"
    "confirmation before doing anything destructive.";
};
#endif

/* * * * * * * *
 *
 *  INPUT/OUTPUT files
 */
#ifdef INPUT_FLAG
#define INPUT
#endif

#ifdef INPUT
flag = {
    name      = input;
    arg-type  = string;
#ifdef INPUT_FLAG
    value     = i;        /* flag style option character */
#endif
    descrip   = "redirect input from file";
    doc =
    "This option specifies the file to use for program input.";
};
#endif

#ifdef OUTPUT_FLAG
#define OUTPUT
#endif

#ifdef OUTPUT
flag = {
    name      = output;
    arg-type  = string;
#ifdef OUTPUT_FLAG
    value     = o;        /* flag style option character */
#endif
    descrip   = "redirect output to file";
    doc =
    "This option specifies the file to use for program output.";
};
#endif

/* * * * * * * *
 *
 *  INPUT/OUTPUT directory
 */
#ifdef DIRECTORY_FLAG
#define DIRECTORY
#endif

#ifdef DIRECTORY
flag = {
    name      = directory;
    arg-type  = string;
#ifdef DIRECTORY_FLAG
    value     = d;        /* flag style option character */
#endif
    descrip   = "use specified dir for I/O";
    doc =
    "This option specifies the directory to use for program input and output.";
};
#endif