Predefined node variables
Each Project Manager node has a defined set of variables containing values determined at runtime.
These variables can be used in:
- Build, link, and execution rules (see Build Rules Configuration dialog)
- Package and deploy rules
- Environment variables at node level (see Advanced Properties dialog)
Note:
For further details about the locations where you can set the environment variables, see Where to set environment variables.
Variable | Description | Group | Application | Library | File | Package |
---|---|---|---|---|---|---|
$(BAFilePath) | Absolute path of the 4ba file. | X | X | X | X | |
$(BinaryName) | Name of the binary to execute. | X | X | X | ||
$(BuildInputFileDirs) | List of all file directories for source files used by a build rule. | X | X | |||
$(BuildInputFileNames) | List of all source files for a build rule. | X | X | |||
$(BuildInputFilePaths) | List of absolute file paths for source files used by a build rule. | X | X | |||
$(BuildOutputBaseNames) | List names of all output files for a build rule, without extension or path. | X | X | |||
$(BuildOutputFileNames) | List of all output files for a build rule. | X | X | |||
$(BuildOutputFilePaths) | List of absolute file paths for build output files. | X | X | |||
$(CommandLineArgs) | Arguments passed to the application when it is launched. | X | ||||
$(CompilerOptions) | Options to be passed to the compiler. For example, -S dumps
Static SQL messages found in the source. |
X | X | X | X | |
$(Dependencies) | List of link output files (link results) of all dependencies binary nodes. For example, your Application depends on 2 libraries, lib1 and lib2. The lib1 link rule creates the $(TargetDir)/lib1.42x output file, and the lib2 link rule creates the $(TargetDir)/lib2.42x output file. The Application Dependencies is a list of these paths: {$(TargetDir)//lib1.42x $(TargetDir)//lib2.42x} | X | X | |||
$(DistDir) | Value of the Distribution directory property. | X | ||||
$(ExecutableName) | Executable name. | X | ||||
$(GSTDIR) | Genero Studio installation directory path. | X | X | X | X | X |
$(GSTSETUPDIR) | Application Generator template directory path. | X | X | X | X | |
$(Implicit) | FGL argument -implicit=none | X | ||||
$(InputBaseName) | Input file base name, without extension. | X | ||||
$(InputDir) | Absolute directory of the input file. | X | ||||
$(InputExtension) | Input file extension. | X | ||||
$(InputMimeType) | Input file MIME type. | X | ||||
$(InputName) | Input filename, with extension. | X | ||||
$(InputPath) | Absolute path of the input file. | X | ||||
$(IntermediateFilePaths) | List of intermediate file paths. | X | X | |||
$(JavaSourceDir) | Absolute path of the Java source directory (packages root). | X | ||||
$(JavaSourcePaths) | Java source path (JavaSourceDir of dependencies). | X | ||||
$(Language) | The programming language to be used when building a node. See Languages. | X | X | X | X | |
$(LinkerOptions) | Options to be passed when linking. | X | X | X | ||
$(LinkOutputFileBaseNames) | List names of all output files for a link rule, without extension or path. | X | X | |||
$(LinkOutputFileNames) | List of all output files for a link rule. | X | X | |||
$(LinkOutputFilePaths) | List of absolute file paths for output files used by a link rule. | X | X | |||
$(PackageName) | Value of the PackageName property. | X | ||||
$(ProjectDir) | The directory where the 4pw file is located. | X | X | X | X | |
$(RelativeDir) | A list of directory names, corresponding to the path difference between the
source directory and the current directory. For example, the source directory is
$(ProjectDir)/src, and the file path is
$(ProjectDir)/src/com/d1/Account.java. The relative directory would be the
string list {com d1}. To use, you typically join with a separator:
|
X | X | |||
$(TargetDir) | Target directory of the compiled files. | X | X | X | X | |
$(TargetPaths) | List of target directories of all dependencies. | X | X | X | X | |
$(XCFFilePath) | Path of the XCF file found for the application. | X | X |
List Expansion
For all variables that contain a list of files, for example $(BuildInputFiles), special syntax is used to expand the list.
To get a list with a specific file extension, use a
colon:
$(variableName:.extension)
For example, $(BuildInputFiles:.javac)
returns all files
with a java extension in the $(BuildInputFiles) list,
separated by a space.
To get a list with a specific separator, use the pipe
symbol:
$(variableName|separator)
For example, $(BuildInputFiles|#)
returns all the files in the
$(BuildInputFiles) list, separated by a #.