# Define all possible option for the compile command : sat compile <options>
parser = src.options.Options()
parser.add_option('p', 'products', 'list2', 'products',
- _('Optional: products to compile. This option can be'
- ' passed several time to compile several products.'))
+ _('Optional: products to compile. This option accepts a comma separated list.'))
parser.add_option('', 'with_fathers', 'boolean', 'fathers',
_("Optional: build all necessary products to the given product (KERNEL is "
"build before building GUI)."), False)
batch=True,
verbose=0,
logger_add_link = logger)
-
+
+
# Clean the the install directory
# if the corresponding option was called
if options.clean_install and not options.clean_all:
# product that have been successfully compiled
if res==0:
logger.write(_("Add the config file in installation directory\n"), 5)
- add_compile_config_file(p_info, config)
+ src.product.add_compile_config_file(p_info, config)
if options.check:
# Do the unit tests (call the check command)
return res, len_end_line, error_step
-def add_compile_config_file(p_info, config):
- '''Execute the proper configuration command(s)
- in the product build directory.
-
- :param p_info Config: The specific config of the product
- :param config Config: The global configuration
- '''
- # Create the compile config
- compile_cfg = src.pyconf.Config()
- for prod_name in p_info.depend:
- if prod_name not in compile_cfg:
- compile_cfg.addMapping(prod_name,
- src.pyconf.Mapping(compile_cfg),
- "")
- prod_dep_info = src.product.get_product_config(config, prod_name, False)
- compile_cfg[prod_name] = prod_dep_info.version
- # Write it in the install directory of the product
- compile_cfg_path = os.path.join(p_info.install_dir, src.CONFIG_FILENAME)
- f = open(compile_cfg_path, 'w')
- compile_cfg.__save__(f)
- f.close()
def description():
'''method that is called when salomeTools is called with --help option.
# Get the list of products to treat
products_infos = src.product.get_products_list(options, runner.cfg, logger)
+ products_infos = [pi for pi in products_infos if not(
+ src.product.product_is_fixed(pi[1]))]
if options.fathers:
# Extend the list with all recursive dependencies of the given products