Documente Academic
Documente Profesional
Documente Cultură
CC %f controls what is echoed to the user when the command is run; note
that the space after the rst is required; the letters immediately following the
would be ags.
%B evalutes to the name of the current le without the extension; similarly, %f
is the name of the current input le, and %o is the name of the current output
le.
C.2.6 Flags
-ags
the c ag causes the command to run inside a chroot-environment (currently
under Linux and OSX), so that the effective working directory of the subprocess
is different from the current working directory.
%-ags
%f the current lename from the inputs section
%b the basename (path stripped) of the current input le
%B like %b, but strips the lename extension
%e the extension of current le with foreach
%o the name(s) of output le(s) in the cammand section
%O like %o, but without the extension
%d the name of the lowest-level directory in path
C.2.7 Directives
ifeq (val1,val2)
C.2. USING TUP 259
The ifeq-directive tells Tup to do the things before the next endif or else in case val1
is found to be equal to val2. Note that any spaces included within the parentheses are
processed verbatim. All $- and @-variables are substituted within val1 and val2.
ifneq (val1,val2)
The ifneq-directive inverts the logic of ifeq; the following things are done if val1 is not
equal with val2.
ifdef VARIABLE
The things before the next endif shall be done if the @-variable is dened at all in
tup.cong.
ifndef VARIABLE
ifndef inverts the logic of ifdef.
else
else toggles the logical truth value of the previous ifeq/ifneq/ifdef/ifndef statement.
endif
Ends the previous ifeq/ifneq/ifdef/ifndef statement.
include le
Reads a regular le and continues parsing the current Tuple.
include_rules
Scans the directory tree up for the rst Tuprules.tup le and then reads all Tuprules.tup
les from it down to the one possibly in the current directory. Usually specied as the
rst line in Tuple.
run ./script args
Run an external script with the given arguments to generate :-rules. The script is
expected to write the :-rules to standard output (stdout). The script cannot create $-
variables or !-macros, but it can output :-rules that use those features.
preload directory
By default, run-scripts can only use wild-cards for les in the current directory. To
specify other wild-card directories to be scanne, you can use preload.
export VARIABLE
Adds the environment variable VARIABLE to be used by future :-rules and run-scripts.
VARIABLE comes from environment, not the Tuple, so you can control the contents
using your shell. On Unix-systems, only PATH is exported by default.
.gitignore
Tells Tup to automatically generate a .gitignore le with a list of Tup-generated output
les.
#
# at the beginning of a line marks the line as a comment.