1 2 3 4 5 6 7 8 9 10 11
12
13 package xdc.tools.closure;
14
15 /*!
16 * ======== xdc.tools.closure.Main ========
17 * Utility that creates a closed bundle
18 *
19 * The purpose of this tool is to build a bundle containing all packages
20 * loaded in the process of configuring an application. The bundle is
21 * built in a user-selected repository, which can be then relocated to
22 * a different location or to a different host, where the application
23 * being configured can be recompiled and relinked.
24 *
25 * The closure tool can run only after {@link xdc.tools.configuro} runs
26 * and finishes the configuration step. Then, `xdc.tools.closure' detects
27 * all packages involved in the configuration and copies them to a new
28 * repository. All absolute paths in the relevant generated files that
29 * could be accessed by the user's makefile, when the application is
30 * rebuilt, are transformed into the paths relative to the the directory
31 * containing the closed bundle.
32 *
33 * Some files in the copied packages are deleted to keep the size of
34 * the closed bundle manageable. The default settings delete only selected
35 * files, but a user has an option of requesting aggressive filtering of
36 * files, which leaves in the closed bundle only header files and
37 * libraries referenced by linker command files.
38 *
39 * @a(Examples)
40 * @p(code)
41 * xs xdc.tools.configuro -t gnu.targets.arm.GCArmv6 -o configPkg
42 * xs xdc.tools.closure -d D:/bundle C:/examples/memory/configPkg
43 * @p
44 *
45 * After `xdc.tools.configuro` creates a configuration in `configPkg`,
46 * `xdc.tools.closure` gathers all packages loaded during the
47 * configuration into a repository located in `D:/bundle`.
48 */
49 metaonly module Main inherits xdc.tools.ICmd {
50
51 override config String usage[] = [
52 '[-v] [-f] [-i pkg1 [-i pkg2 ...]] [-d dst_dir] package_base_dir'
53 ];
54
55 instance:
56
57 //!Print informative messages during execution
58 @CommandOption('v')
59 config Bool verboseFlag = false;
60
61 //!Perform aggressive filtering
62 @CommandOption('f')
63 config Bool aggFilter = false;
64
65 //!Name of the destination directory
66 @CommandOption('d')
67 config String destination = "";
68
69 //!Additional packages to be included in the bundle
70 @CommandOption('i')
71 config String includes[] = [];
72 }
73
74
75 76 77
78