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 * xs xdc.tools.configuro -t gnu.targets.arm.GCArmv6 -o configPkg --cb
41 * memory.cfg
42 * xs xdc.tools.closure -d D:/bundle C:/examples/memory/configPkg
43 * @p(dlist)
44 * After `xdc.tools.configuro` creates a configuration in `configPkg`,
45 * `xdc.tools.closure` gathers all packages loaded during the
46 * configuration in a repository located in D:/bundle
47 * @p
48 *
49 */
50 metaonly module Main inherits xdc.tools.ICmd {
51
52 override config String usage[] = [
53 '[-v] [-f] [-i pkg1 [-i pkg2 ...]] [-d dst_dir] package_base_dir'
54 ];
55
56 instance:
57
58 //!Print informative messages during execution
59 @CommandOption('v')
60 config Bool verboseFlag = false;
61
62 //!Perform aggressive filtering
63 @CommandOption('f')
64 config Bool aggFilter = false;
65
66 //!Name of the destination directory
67 @CommandOption('d')
68 config String destination = "";
69
70 //!Additional packages to be included in the bundle
71 @CommandOption('i')
72 config String includes[] = [];
73 }
74
75
76 77 78
79