Invoking Cogeno¶
Synopsis¶
cogeno [OPTIONS]
Description¶
Cogeno transforms files in a very simple way: it finds chunks of script code embedded in them, executes the script code, and places its output combined with the original file content into the generated file. It supports Python and Jinja2 scripts.
Options¶
The following options are understood:
-h, --helpshow this help message and exit
-x, --delete-codeDelete the generator code from the output file.
-w, --warn-emptyWarn if a file has no generator code in it.
-n ENCODING, --encoding ENCODINGUse ENCODING when reading and writing files.
-U, --unix-newlinesWrite the output with Unix newlines (only LF line-endings).
-D DEFINE, --define DEFINEDefine a global string available to your generator code.
-m DIR [DIR ...], --modules DIR [DIR ...]Use modules from modules DIR. We allow multiple
-t DIR [DIR ...], --templates DIR [DIR ...]Use templates from templates DIR. We allow multiple
-e DIR [DIR ...], --extensions DIR [DIR ...]Import extensions from extensions DIR. We allow multiple
-i FILE, --input FILEGet the input from FILE.
-o FILE, --output FILEWrite the output to FILE. “-” indicates stdout.
--output-sanitize-suffixSanitize the suffix of the output file. Remove typical template suffixes.
-l FILE, --log FILELog to FILE.
-k FILE, --lock FILEUse lock FILE for concurrent runs of cogeno.
--baseReturn the base directory of cogeno. Other options are ignored.
Additional options are related to Cogeno modules.
--cmake:cache FILEUse CMake variables from CMake cache FILE.
--cmake:define [defxxx=valyyy ...]Define CMake variables to your generator code.
--config:db FILEWrite or read config database to/ from FILE.
--config:file FILERead configuration variables from this FILE.
--config:kconfig-file FILETop-level Kconfig FILE (default: Kconfig).
--config:kconfig-srctree DIRKconfig files are looked up relative to the srctree DIR (unless absolute paths are used), and .config files are looked up relative to the srctree DIR if they are not found in the current directory.
--config:kconfig-defines DEFINE [DEFINE ...]Define variable to Kconfig. We allow multiple.
--config:inputs FILE [FILE ...]Read configuration file fragment from FILE. We allow multiple.
--edts:bindings-dirs DIR [DIR ...]Use bindings from bindings DIR for device tree extraction. We allow multiple.
--edts:bindings-exclude [DIR ...] [FILE ...]Exclude bindings DIR or FILE from usage for device tree extraction. We allow multiple.
--edts:bindings-no-defaultDo not add EDTS database’s generic bindings to bindings by default.
--edts:db FILEWrite or read EDTS database to/ from FILE.
--edts:dts FILEWrite (see dts-pp-sources) or read device tree specification to/ from this FILE.
--edts:dts-pp-sources FILE [FILE ...]Generate the DTS file by pre-processing the DTS source FILE(s).
--edts:dts-pp-include-dirs DIR [DIR ...]Define include DIR(s) to pre-processor.
--edts:dts-pp-defines DEFINE [DEFINE ...]DEFINE variable to pre-processor.
--protobuf:db-dir DIRWrite or read protocol buffer code databases to/ from DIR.
--protobuf:sources FILE [FILE ...]The *.proto source FILE(s) to generate the protocol buffer code for.
--protobuf:include-dirs DIR [DIR ...]Search for *.proto import files in the protocol buffer include DIR(s).