Salome HOME
Mise à jour du template PythonComponent
[tools/sat.git] / commands / compile.py
index 1a80f40cd1bb0c5d243f2a2396251fe8593fe33a..f7bcb0d2d65b5375552e283a7cfb13263ea0ea62 100644 (file)
@@ -32,8 +32,7 @@ except NameError:
 # 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)
@@ -283,7 +282,8 @@ def compile_all_products(sat, config, options, products_infos, logger):
                       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:
@@ -464,7 +464,7 @@ def compile_product(sat, p_name_info, config, options, logger, header, len_end):
     # 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)
@@ -592,27 +592,6 @@ def compile_product_script(sat,
               
     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.
@@ -660,6 +639,8 @@ def run(args, runner, logger):
 
     # 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