1    /* 
     2     *Copyright (c) 2008 Texas Instruments and others.
     3     *  All rights reserved. This program and the accompanying materials
     4     *  are made available under the terms of the Eclipse Public License v1.0
     5     *  which accompanies this distribution, and is available at
     6     *  http://www.eclipse.org/legal/epl-v10.html
     7     * 
     8     *  Contributors:
     9     *      Texas Instruments - initial implementation
    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     *  @(#) xdc.tools.closure; 1, 0, 0,175; 5-30-2015 10:01:01; /db/ztree/library/trees/xdctools/xdctools-f62x/src/
    77     */
    78