Name
TargetTool.exe or TargetToo.py – Command line tool edits EDKII build configuration file: target.txt.
Synopsis
TargetTool [-m <ThreadNum>] [-t <Target>] [-a <Arch>] [-p <DscFile>] [-c <ToolDefFile>] [-n <TagName>] [-r <Rule>] <Args>
TargetTool –h
TargetTool --version
Description
TargetTool prints current build setting in target.txt. It can also be used to clear current setting in target.txt. or to modify the current setting in target.txt. After it sets the build configuration, build tool can run without any command line option to build the tip with the current setting in target.txt. TargetTool command line option can be specified together to print or set one or a group of configurations.
Options
If no options are specified, tool prints error message.
Args
This is the required command option, which can be one of the follow values.
Clean  Clean the all default configuration of target.txt.
Print   Print the all default configuration of target.txt.
Set    Replace the default configuration with expected value specified by option.
-a TARGET_ARCH, --arch=TARGET_ARCH
ARCHS is one of the list: IA32, X64, IPF or EBC, which replaces target.txt's TARGET_ARCH definition. To specify more archs, repeat this option. 0 will clear this setting in target.txt and can't combine with other value.
-p DSCFILE, --platform=DSCFILE
Specify a DSC file, which replace target.txt's ACTIVE_PLATFORM definition. 0 will clear this setting in target.txt and can't combine with other value.
-c TOOL_DEFINITION_FILE, --tooldef=TOOL_DEFINITION_FILE
Specify the WORKSPACE relative path of tool_def.txt file, which replace target.txt's TOOL_CHAIN_CONF definition. 0 will clear this setting in target.txt and can't combine with other value.
-t TARGET, --target=TARGET
TARGET is one of the list: DEBUG, RELEASE, which replaces target.txt's TARGET definition. To specify more TARGET, repeat this option. 0 will clear this setting in target.txt and can't combine with other value.
-n TOOL_CHAIN_TAG, --tagname=TOOL_CHAIN_TAG
Specify the Tool Chain Tagname, which replaces target.txt's TOOL_CHAIN_TAG definition. 0 will clear this setting in target.txt and can't combine with other value.
-r BUILD_RULE_FILE, --buildrule=BUILD_RULE_FILE
Specify the build rule configure file, which replaces target.txt's BUILD_RULE_CONF definition. If not specified, the default value Conf/build_rule.txt will be set.
-m NUM, --multithread=NUM
Specify the multi-thread number which replaces target.txt's MAX_CONCURRENT_THREAD_NUMBER. If the value is less than 2, MULTIPLE_THREAD will be disabled. If the value is larger than 1, MULTIPLE_THREAD will be enabled.
--version
Show program version number and exit
-h, --help
Show this help message and exit
Status codes returned
0	The action was completed as requested.	
1	The action failed.	
Example
1. Print current build setting in target.txt  
TargetTool Print
2. Clear current build setting in target.txt.
TargetTool Clean
3. Set the build thread number to 3.
TargetTool -m 3 set
4. Set the build arch to IA32, X64 and IPF both.
TargetTool -a IA32 -a X64 -a IPF set
5. Set the build target to DEBUG and set the active platform to NT32Pkg.dsc
TargetTool -t DEBUG -p Nt32Pkg/Nt32Pkg.dsc set
Bugs
No known issues.
Report bugs to edk2-buildtools-devel@lists.sourceforge.net
Files
None
See also
None
License
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available 
under the terms and conditions of the BSD License which accompanies this 
distribution.  The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.