94 Variables
A variable is defined like this
$name = "my string value"
Variables can be defined in both .xcpj and .xcpp files. A variable can be reassigned a new value. Currently variables can only be “invoked” from within string literals (meaning that the variable reference of the form $(name) is replaced with its current value within the string literal, rather like a macro substitution). Note that the brackets are used in a reference but not a definition of a variable. E.g.
+link
{
/OUT:"$(EXPORT)/$(PLATFORM)/$(CONFIG)/
$(PROJNAME).$(TGT_EXTENSION)"
}
The variables defined in the .xcpp file (but not the .xcpj file itself) are made available as macros to the Xcpp Macro Preprocessor by enclosing the variable name in underscores. E.g. there are macros named _EXPORT_ and _PLATFORM_.
Predefined variables
The following variables are predefined:
- $(PROJNAME) - the name of the project.
- $(EXPORT) - the path to the export directory relative to the build directory.
- $(TARGET_TYPE) - The type of target to be built
- $(TGT_EXTENSION) - Either "exe", "dll" or "lib" depending on $TARGET_TYPE.
- $(ROOT_TO_PROJDIR) - The path from the virtual tree root to the project directory.
- $(PROJDIR_TO_ROOT) - The path from the project directory to the virtual tree root.
- $(PLATFORM) - The name of the platform. E.g. "Win32" or "Pocket PC 2003 (ARMV4)"
- $(CONFIG) - The name of the configuration - typically either "Release" or "Debug".