3.3 Script expansion |
For maximum flexibility, you can embed scripts using the
[[ ]] operator as a
special case of variable expansion. Embedded scripts have access to all standard functionalities available to
scrips and work pretty much like bash backticks (except for having access to CodeBlocks namespace). As such,
scripts are not limited to producing text output, but can also manipulate CodeBlocks state (projects, targets,
etc.).
Note:
Manipulating CodeBlocks state should be implemented rather with a pre-build script than with a script.
Manipulating CodeBlocks state should be implemented rather with a pre-build script than with a script.
The expression in backticks returns a list of all executables *.elf
in any subdirectories. The result of this expression
can be used directly by
objdump. Finally the
output is piped to a file named
name.dis. Thus,
processes can be automatted in a simple way without having to program any loops.
The script text is replaced by any output generated by your script, or discarded in case of a syntax error.
Since conditional evaluation runs prior to expanding scripts, conditional evaluation can be
used for preprocessor functionalities. Built-in variables (and user variables) are expanded after scripts, so
it is possible to reference variables in the output of a script.
inserts the title of the active project into the command line.
3.2.8 Conditional Evaluation
3.4 Command Macros
Created: 2010/25/05 11:52 Updated: 2010/25/05 11:52
Author: HighTec EDV-Systeme GmbH
Copyright © 2010 HighTec EDV-Systeme GmbH
Author: HighTec EDV-Systeme GmbH
Copyright © 2010 HighTec EDV-Systeme GmbH