metaonly module xdc.tools.closure.Main |
 |
Utility that creates a closed bundle
The purpose of this tool is to build a bundle containing all packages
loaded in the process of configuring an application. The bundle is
built in a user-selected repository, which can be then relocated to
a different location or to a different host, where the application
being configured can be recompiled and relinked.
[
more ... ]
var Main = xdc.useModule('xdc.tools.closure.Main');
module-wide config parameters
'[-v] [-f] [-i pkg1 [-i pkg2 ...]] [-d dst_dir] package_base_dir'
];
module-wide functions
per-instance config parameters
per-instance functions
DETAILS
The purpose of this tool is to build a bundle containing all packages
loaded in the process of configuring an application. The bundle is
built in a user-selected repository, which can be then relocated to
a different location or to a different host, where the application
being configured can be recompiled and relinked.
The closure tool can run only after
xdc.tools.configuro runs
and finishes the configuration step. Then, `xdc.tools.closure' detects
all packages involved in the configuration and copies them to a new
repository. All absolute paths in the relevant generated files that
could be accessed by the user's makefile, when the application is
rebuilt, are transformed into the paths relative to the the directory
containing the closed bundle.
Some files in the copied packages are deleted to keep the size of
the closed bundle manageable. The default settings delete only selected
files, but a user has an option of requesting aggressive filtering of
files, which leaves in the closed bundle only header files and
libraries referenced by linker command files.
EXAMPLES
xs xdc.tools.configuro -t gnu.targets.arm.GCArmv6 -o configPkg
xs xdc.tools.closure -d D:/bundle C:/examples/memory/configPkg
After xdc.tools.configuro creates a configuration in configPkg,
xdc.tools.closure gathers all packages loaded during the
configuration into a repository located in D:/bundle.
config Main.usage // module-wide |
 |
Usage for this command
Main.usage = String[] [
'[-v] [-f] [-i pkg1 [-i pkg2 ...]] [-d dst_dir] package_base_dir'
];
Main.exec() // module-wide |
 |
xs script entry point
Main.exec(Any args) returns Any
DETAILS
This function is called from within other XDCscript scripts and
performs the same operations as
main() except that,
rather than output the return value of
inst.run(), this value
is simply returned to the caller of
exec().
Main.main() // module-wide |
 |
xs shell entry point
Main.main(Any args) returns Any
DETAILS
This function
- creates a no-arg instance, inst, of the module inheriting
this interface;
- parses command line arguments placing all options in the config
params of the inheriting module;
- creates a xdc.tools.Cmdr instance, cmdr;
- calls inst.run() with the cmdr and any command
line command line arguments not parsed as options; and
- outputs the return result from inst.run()
Instance Config Parameters |
 |
var params = new Main.Params;
// Instance config-params object
params.aggFilter = Bool false;
// Perform aggressive filtering
params.destination = String "";
// Name of the destination directory
params.includes = String[] [ ];
// Additional packages to be included in the bundle
params.verboseFlag = Bool false;
// Print informative messages during execution
config Main.Params.aggFilter // instance |
 |
Perform aggressive filtering
var params = new Main.Params;
...
params.aggFilter = Bool false;
config Main.Params.destination // instance |
 |
Name of the destination directory
var params = new Main.Params;
...
params.destination = String "";
config Main.Params.includes // instance |
 |
Additional packages to be included in the bundle
var params = new Main.Params;
...
params.includes = String[] [ ];
config Main.Params.verboseFlag // instance |
 |
Print informative messages during execution
var params = new Main.Params;
...
params.verboseFlag = Bool false;
Main.run() // instance |
 |
Underlying implementation of the command
DETAILS
Since this method is used to support both command line tools and
other XDCscript scripts, it is important to avoid explicit
termination of the JVM via java.lang.System.exit(); doing so
precludes callers from handling failures.
Implementations should instead call
generated on Wed, 24 Jun 2015 01:01:29 GMT