TargetTool.exe

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:
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.
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-a TARGET_ARCH, --arch=TARGET_ARCH
ARCHS is one of list: IA32, X64, IPF, ARM, AARCH64 or
EBC, which replaces target.txt's TARGET_ARCH
definition. To specify more archs, please 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 list: DEBUG, RELEASE, which replaces
target.txt's TARGET definition. To specify more
TARGET, please 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, --multithreadnum=NUM
Specify the multi-thread number which replace
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.

Status codes returned

Return Value

Description

0

The action was completed as requested.

1

The action failed.

Example

  1. Print current build setting in target.txt

TargetTool Print
  1. Clear current build setting in target.txt.

TargetTool Clean
  1. Set the build thread number to 3.

TargetTool -m 3 set
  1. Set the build arch to IA32, X64 and IPF both.

TargetTool -a IA32 -a X64 -a IPF set
  1. 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 [email protected]

Files

None

See also

None

License

Copyright (c) 2007 - 2016, 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.