5.3 target.txt File

This file is used to filter the build so that only required components are used. It also provides pointers to the tools_def.txt file, and the active build_rule.txt files. All file names are relative to the system environment variable, WORKSPACE. No wildcard characters are permitted in this file. All entries in this file are case-sensitive.

While the values in this file filter what will be built, the TARGET, TARGET_ARCH and TOOL_CHAIN_TAG values may also be overridden on the build tool's command line.

The following well known macro names may be used in other EDK II meta-data files, $(TARGET), $(ARCH) and $(TOOL_CHAIN_TAG) and are mapped to the TARGET, TARGET_ARCH and TOOL_CHAIN_TAG in this file or from options specified on the command line which override the settings in this file.

Prototype

<TargetText>   ::= [<Platform>]
                   [<Target>]
                   [<TargetArch>]
                   [<ToolsDef>]
                   [<ToolTagName>]
                   [<ThreadEnable> <EOL>]
                   [<BldRuleConf>]
<TabSpace>     ::= {0x09} {0x20}
<TS>           ::= <TabSpace>*
<MTS>          ::= <TabSpace>+
<Eq>           ::= <TS> "=" <TS>
<Platform>     ::= "ACTIVE_PLATFORM" <Eq> [PlatformFile] <EOL>
<Target>       ::= "TARGET" <Eq> [<Targets>] <EOL>
<Targets>      ::= TargetVal [" " TargetVal]*
<TargetArch>   ::= "TARGET_ARCH" <Eq> [<Archs>] <EOL>
<Archs>        ::= Arch [" " Arch]*
<ToolsDef>     ::= "TOOL_CHAIN_CONF" <Eq> ToolDefsFile <EOL>
<ToolTagName>  ::= "TOOL_CHAIN_TAG" <Eq> TagName <EOL>
<ThreadEnable> ::= "MAX_CONCURRENT_THREAD_NUMBER" <Eq> [<NumThrds>]
<NumThrds>     ::= (1-9) [(0-9)]*
<BldRuleConf>  ::= "BUILD_RULE_CONF" <Eq> BuildRulesFile <EOL>
<Paths>        ::= (a-zA-Z0-9) (a-zA-Z0-9\_\-)* "/"
<Filenames>    ::= <Paths>* (a-zA-Z0-9)(a-zA-Z0-9\_\-)* ["." <Ext>]
<Ext>          ::= (a-zA-Z0-9)+
<EOL>          ::= <TS> 0x0D 0x0A

Parameters

PlatformFile

Specify the WORKSPACE relative Path and Filename of the platform DSC file that will be used for the build. This line is required only if the current working directory does not contain one or more DSC files.

TargetVal

Zero or more of the following: NOOPT, DEBUG, RELEASE, a user defined word in the tools_def.txt file; separated by a space character. If the line is missing or no value is specified, all valid targets specified in the DSC file will attempt to be built.

Arch

The target architectures that are specified on the command-line override the TARGET_ARCH entry in the target.txt file. The resulting architecture must also be listed as one of the architectures in the SUPPORTED_ARCHITECTURES entry in the DSC file's [Defines] section. If the target architecture is not specified on the command-line and the TARGET_ARCH entry does not exist in the target.txt file, then all valid architectures specified in the DSC file, for which tools are available, will be built. The architectures are space separated.

ToolDefsFile

Specify the name of the filename to use for specifying the tools to use for the build.

If not specified, the file: WORKSPACE/Conf/tools_def.txt will be used for the build. The path and file name must be relative to the WORKSPACE directory.

TagName

Specify the name of the tools_def.txt tool chain tag name to use. If not specified in this file and it is not specified using the -t option on the command-line, then the build will break.

Integer

The number of concurrent threads. If not specified or set to zero, tool automatically detect number of processor threads. Recommend setting this value to one less than the number of computer cores or CPUs of the development workstation. When value set to 1, means disable multi-thread build, and value set to more than 1, means user specify the thread number to build.

BuildRulesFile

Specify the file name to use for the build rules that are followed when generating Makefiles. If not specified, the file: WORKSPACE/Conf/build_rule.txt will be used.

The path and file name must be relative to the WORKSPACE directory.