2
The following options are understood
5
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
9
These options cause critcl to print its version to [const stdout] and
12
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
15
This option specifies an additional global include path to use during
16
compilation of [file .critcl] files. All values are used if this is
17
specified multiple times.
19
[para] This option is irrelevant when generating a TEA package (see
20
option [option -tea] below).
22
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
25
This option specifies an additional global library searh path to use
26
during linking of [file .critcl] files. All values are used if this is
27
specified multiple times.
29
[para] This option is irrelevant when generating a TEA package (see
30
option [option -tea] below).
32
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
35
This option specifies the path to the directory to use as the result
36
cache. If not specified it defaults to [file ~/.critcl/<platform>],
37
or, when generating a package (see option [option -pkg] below), to
38
[file ~/.critcl/<pid>.<epoch>],
40
When specified multiple times the last value is used.
42
[para] This option is irrelevant when generating a TEA package (see
43
option [option -tea] below).
45
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
48
When specified the result cache is emptied, i.e. all files and
49
directories found inside are deleted) before compilation begins.
51
[para] This option is irrelevant when generating a package (see option
52
[option -pkg] below) because this mode starts out with a unique and
55
[para] This option is irrelevant when generating a TEA package (see
56
option [option -tea] below).
58
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
59
[opt_def -config path]
61
This option specifies the path to a custom configuration file,
62
allowing the user to use their own target specifications. If not
63
specified a hardwired default configuration embedded in the system
66
When specified multiple times the last value is used.
68
[para] This option is irrelevant when generating a TEA package (see
69
option [option -tea] below).
71
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
74
This option activates compilation with debugging. It accepts the modes
77
When specified multiple times the combination of all modes is used.
79
[para] This option is irrelevant when generating a TEA package (see
80
option [option -tea] below).
82
[list_begin definitions]
85
This mode activates memory debugging of allocations made through the
90
This mode activates building of all [file .c] files with debugging
95
This mode activates both [const memory] and [const symbols].
99
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
100
[opt_def -disable name]
102
This option sets the value of the custom build configuration option
103
[arg name] to [const false]. It is equivalent to "-with-[arg name] 0".
105
[para] The information is validated only if one of the [file .critcl]
106
input files actually defines and uses a custom build configuration
107
option with that [arg name].
109
[para] This option is irrelevant when generating a TEA package (see
110
option [option -tea] below).
112
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
113
[opt_def -enable name]
115
This option sets the value of the custom build configuration option
116
[arg name] to [const true]. It is equivalent to "-with-[arg name] 1".
118
[para] The information is validated only if one of the [file .critcl]
119
input files actually defines and uses a custom build configuration
120
option with that [arg name].
122
[para] This option is irrelevant when generating a TEA package (see
123
option [option -tea] below).
125
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
128
When specified compilation is always done, even if a shared library
129
for the file exists already. This effect can be had through cleaning
130
the cache (see above) as well, except that it is lazy in the
131
destruction of files and will not destroy files unrelated to the ones
134
[para] This option is irrelevant when generating a package (see option
135
[option -pkg] below) because this mode starts out with a unique and
138
[para] This option is irrelevant when generating a TEA package (see
139
option [option -tea] below).
141
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
144
This option will cause the system to print a short help about command
145
line syntax and options and then exit the application.
147
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
150
This option will cause the system to keep the [file .c] files
151
generated by a run in the result cache.
153
When generating a package (see option [option -pkg] below) this also
154
prevents the deletion of the unique result cache used by the run.
156
This option is intended for the debugging of [cmd critcl] itself,
157
where it may be necessary to inspect the generated C code.
159
[para] This option is irrelevant when generating a TEA package (see
160
option [option -tea] below).
162
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
163
[opt_def -libdir path]
165
This option specifies the path under which the packages generated via
166
option [option -pkg] are saved. It also specifies a path to search
167
libraries in, like for [option -L].
169
When specified multiple times the last value is used.
171
When not specified at all the default, [file lib], is used. Note how
172
this is a relative path, placing the result into the current working
175
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
176
[opt_def -includedir path]
178
This option specifies the path under which any generated package
179
headers are saved. It also specifies a path to search include files
180
in, like for [option -I].
182
When specified multiple times the last value is used as destination,
183
however all previous values are kept on the include search path.
185
When not specified at all the default, [file include], is used. Note
186
how this is a relative path, placing the result into the current
189
[para] This option is irrelevant when generating a TEA package (see
190
option [option -tea] below).
192
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
195
The default mode of the application is to build the [file .critcl]
196
files listed on the command line and save the results in the result
197
cache. Essentially pre-filling the cache with important packages,
198
cutting down on the time needed to use these packages.
202
This option activates one of the other modes, package generation.
204
In this mode the input files are processed first as usual, however
205
after that they are bundled into a single library and additional files
206
are generated to make this library usable as a regular Tcl package.
210
The option [option -tea], see below, invokes the last mode, TEA
211
generation. If both options, i.e. [option -pkg] and [option -tea] are
212
specified the last one specified wins.
216
In this mode the options [option -clean] and [option -force] are
217
irrelevant and ignored. In contrast, the option [option -libdir] is
218
relevant in both this and [option -tea] mode.
222
When this option is specified the basename of the first file argument
223
after the options is used as the name of the package to generate. If
224
the extension of that file indicates a shared library ([file .so],
225
[file .sl], [file .dylib], and [file .dll]) it is also removed from
226
the set of input files. A [file .tcl] file is kept as part of the
227
input. A single file without extension is assumed to actually have a
228
[file .tcl] extension. A file without extension, but other input files
229
following is treated like the name of a shared library proper, and
230
removed from the set of input files.
237
=> Package name is: foo
238
=> Input file is: foo.tcl
242
... -pkg ... foo bar.tcl
244
=> Package name is: foo
245
=> Input file is: bar.tcl
251
=> Package name is: foo
252
=> Input file is: foo.tcl
256
... -pkg ... foo.so bar.tcl
258
=> Package name is: foo
259
=> Input file is: bar.tcl
262
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
265
This option, when specified, will cause the system to print the
266
configuration of the chosen target to [const stdout] and then exit.
268
The choice of target can be influenced through the option
269
[option -target] (see below).
271
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
274
This option, when specified, will cause the system to print the whole
275
chosen configuration file to [const stdout] and then exit.
277
The choice of configuration file can be influenced through the option
278
[option -config] (see above).
280
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
281
[opt_def -target name]
283
This option overrides the default choice of build target with
286
When specified multiple times the last value is used.
288
The named target must exist in the chosen configuration file.
290
Use option [option -targets] (see below) to get a list of the
293
The choice of configuration file can be influenced through the option
294
[option -config] (see above).
296
[para] This option is irrelevant when generating a TEA package (see
297
option [option -tea] below).
299
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
302
This option, when specified, will cause the system to print the list
303
of all known targets from the chosen configuration file to
304
[const stdout] and then exit.
306
The choice of configuration file can be influenced through the option
307
[option -config] (see above).
309
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
312
Similar to option [option -pkg], except that the invoked mode does not
313
generate binaries, but a directory hierarchy containing the
314
[file .critcl] file, its companion files, and a TEA-lookalike build
315
system with most of the needed support code (incliding copies of the
320
If both options, i.e. [option -pkg] and [option -tea] are specified
321
the last one specified wins.
325
In this mode the options [option -I], [option -L], [option -clean],
326
[option -force], [option -cache], [option -includedir], [option -enable],
327
[option -disable], and [option -with-[var FOO]] are irrelevant and
328
ignored. In contrast, the option [option -libdir] is relevant in both
329
this and [option -pkg] mode.
333
When this option is specified the basename of the first file argument
334
after the options is used as the name of the package to generate. If
335
the extension of that file indicates a shared library ([file .so],
336
[file .sl], [file .dylib], and [file .dll]) it is also removed from
337
the set of input files. A [file .tcl] file is kept as part of the
338
input. A single file without extension is assumed to actually have a
339
[file .tcl] extension. A file without extension, but other input files
340
following is treated like the name of a shared library proper, and
341
removed from the set of input files.
348
=> Package name is: foo
349
=> Input file is: foo.tcl
353
... -tea ... foo bar.tcl
355
=> Package name is: foo
356
=> Input file is: bar.tcl
362
=> Package name is: foo
363
=> Input file is: foo.tcl
367
... -tea ... foo.so bar.tcl
369
=> Package name is: foo
370
=> Input file is: bar.tcl
373
[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
374
[opt_def -with-[var name] value]
376
This option sets the value of the custom build configuration option
377
[arg name] to [arg value].
379
[para] The information is validated only if one of the [file .critcl]
380
input files actually defines and uses a custom build configuration
381
option with that [arg name].
383
[para] This option is irrelevant when generating a TEA package (see
384
option [option -tea] above).