critcl(1) | C Runtime In Tcl (CriTcl) | critcl(1) |
critcl - CriTcl Application Reference
critcl ?option...? ?file...?
Be welcome to the C Runtime In Tcl (short: CriTcl), a system for embedding and using C code from within Tcl [http://core.tcl-lang.org/tcl] scripts.
This document is the reference manpage for the critcl command. Its intended audience are people having to build packages using critcl for deployment. Writers of packages with embedded C code can ignore this document. If you are in need of an overview of the whole system instead, please go and read the Introduction To CriTcl.
This application resides in the Application Layer of CriTcl.
*================* |Applications | | critcl | | critcl::app | *================* +----------------+ |Core Packages | | critcl | | critcl::util | +----------------+ +----------------+ |Support Packages| | stubs::* | | md5, platform | | ... | +----------------+
. The application supports the following general command line:
The following options are understood:
Ignored when generating a TEA package (see option -tea below).
Ignored when generating a TEA package (see option -tea below).
Ignored when generating a TEA package (see option -tea below).
Ignored when generating a package because this mode starts out with a unique and empty result cache. See option -pkg, below.
Ignored when generating a TEA package (see option -tea below).
Ignored when generating a TEA package (see option -tea below).
Ignored when generating a TEA package (see option -tea below). Uses of this option are cumulative.
Validated only if one of the input files for the CriTcl script actually defines and uses a custom build configuration option with that name.
Ignored when generating a TEA package (see option -tea below).
Validated only if one of the input files for the CriTcl script actually defines and uses a custom build configuration option with that name.
Ignored when generating a TEA package (see option -tea below).
Ignored when generating a package (see option -pkg, below), which starts out with a unique and empty result cache.
Ignored when generating a TEA package (see option -tea below).
Ignored when generating a TEA package (see option -tea below).
Ignored when generating a TEA package (see option -tea below).
generation. If both options, i.e. -pkg and -tea are specified the last one specified wins.
Options -clean and -force are ignored. -libdir is relevant in both this and -tea mode.
The basename of the first file is the name of the package to generate. If its file extension indicates a shared library (".so", ".sl", ".dylib", and ".dll") it is also removed from the set of input files. Each CriTcl script file is kept as part of the input. A single file without a suffix is assumed to be a CriTcl script. A file without a suffix, but other input files following is treated like the name of a shared library proper, and removed from the set of input files.
Examples:
... -pkg ... foo => Package name is: foo => Input file is: foo.tcl
... -pkg ... foo bar.tcl => Package name is: foo => Input file is: bar.tcl
... -pkg ... foo.tcl => Package name is: foo => Input file is: foo.tcl
... -pkg ... foo.so bar.tcl => Package name is: foo => Input file is: bar.tcl
Ignored when generating a TEA package (see option -tea below).
If both -pkg and -tea are specified the last occurrence wins.
-I, -L, -clean, -force, -cache, -includedir, -enable, -disable, and -with-FOO are ignored. In contrast, the option -libdir is relevant in both this and -pkg mode.
The basename of the first file is the name of the package to generate. If its file extension indicates a shared library (".so", ".sl", ".dylib", and ".dll") it is also removed from the set of input files. Each CriTcl script file is kept as part of the input. A single file without a suffix is assumed to be a CriTcl script. A file without a suffix, but other input files following is treated like the name of a shared library proper, and removed from the set of input files.
Examples:
... -tea ... foo => Package name is: foo => Input file is: foo.tcl
... -tea ... foo bar.tcl => Package name is: foo => Input file is: bar.tcl
... -tea ... foo.tcl => Package name is: foo => Input file is: foo.tcl
... -tea ... foo.so bar.tcl => Package name is: foo => Input file is: bar.tcl
The information is validated only if one of the ".critcl" input files actually defines and uses a custom build configuration option with that name.
Ignored when generating a TEA package (see option -tea below).
Packages generated by critcl have the following basic structure:
<TOP> +- pkgIndex.tcl +- critcl-rt.tcl +- license.terms (optional) | +- tcl (optional) | +- <tsources files> | +- <platform> +- <shared library>
Notes
The whole structure, and especially the last point, enable us to later merge the results (for the same package, and version) for multiple target platforms into a single directory structure without conflict, by simply copying the top directories over each other. The only files which can conflict are in the <TOP> and "tcl" directories, and for these we know that they are identical across targets. The result of such a merge would look like:
<TOP> +- pkgIndex.tcl +- critcl-rt.tcl +- license.terms (optional) | +- tcl (optional) | +- <tsources files> | +- <platform1> | +- <shared library1> +- <platform2> | +- <shared library2> ... +- <platformN> +- <shared libraryN>
Jean Claude Wippler, Steve Landers, Andreas Kupries
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report them at https://github.com/andreas-kupries/critcl/issues. Ideas for enhancements you may have for either package, application, and/or the documentation are also very welcome and should be reported at https://github.com/andreas-kupries/critcl/issues as well.
C code, Embedded C Code, calling C code from Tcl, code generator, compile & run, compiler, dynamic code generation, dynamic compilation, generate package, linker, on demand compilation, on-the-fly compilation
Glueing/Embedded C code
Copyright (c) Jean-Claude Wippler Copyright (c) Steve Landers Copyright (c) 2011-2024 Andreas Kupries
3.3.1 | doc |