[DEV] rework isaolated function to manage it in option
This commit is contained in:
28
bin/lutin
28
bin/lutin
@@ -37,6 +37,7 @@ myArgs.add(arguments.ArgDefine("d", "depth", haveParam=True, desc="Depth of the
|
||||
myArgs.add(arguments.ArgDefine("s", "force-strip", desc="Force the stripping of the compile elements"))
|
||||
myArgs.add(arguments.ArgDefine("o", "force-optimisation", desc="Force optimisation of the build"))
|
||||
myArgs.add(arguments.ArgDefine("w", "warning", desc="Store warning in a file build file"))
|
||||
myArgs.add(arguments.ArgDefine("i", "isolate-system", desc="Isolate system build (copy header of c and c++ system lib to not include unneeded external libs) EXPERIMENTAL (archlinux)"))
|
||||
|
||||
myArgs.add_section("properties", "keep in the sequency of the cible")
|
||||
myArgs.add(arguments.ArgDefine("t", "target", haveParam=True, desc="Select a target (by default the platform is the computer that compile this) To know list : 'lutin.py --list-target'"))
|
||||
@@ -237,6 +238,13 @@ def parseGenericArg(argument, active):
|
||||
else:
|
||||
env.set_force_optimisation(False)
|
||||
return True
|
||||
elif argument.get_option_name() == "isolate-system":
|
||||
if active==True:
|
||||
if check_boolean(argument.get_arg()) == True:
|
||||
env.set_isolate_system(True)
|
||||
else:
|
||||
env.set_isolate_system(False)
|
||||
return True
|
||||
elif argument.get_option_name() == "force-strip":
|
||||
if active==True:
|
||||
if check_boolean(argument.get_arg()) == True:
|
||||
@@ -262,34 +270,46 @@ if os.path.isfile(config_file) == True:
|
||||
debug.debug("Find basic configuration file: '" + config_file + "'")
|
||||
# the file exist, we can open it and get the initial configuration:
|
||||
configuration_file = __import__(config_file_name[:-3])
|
||||
|
||||
if "get_exclude_path" in dir(configuration_file):
|
||||
data = configuration_file.get_exclude_path()
|
||||
debug.debug(" get default config 'get_exclude_path' val='" + str(data) + "'")
|
||||
env.set_exclude_search_path(data)
|
||||
|
||||
if "get_parsing_depth" in dir(configuration_file):
|
||||
data = configuration_file.get_parsing_depth()
|
||||
debug.debug(" get default config 'get_parsing_depth' val='" + str(data) + "'")
|
||||
parseGenericArg(arguments.ArgElement("depth", str(data)), True)
|
||||
|
||||
|
||||
if "get_default_jobs" in dir(configuration_file):
|
||||
data = configuration_file.get_default_jobs()
|
||||
debug.debug(" get default config 'get_default_jobs' val='" + str(data) + "'")
|
||||
parseGenericArg(arguments.ArgElement("jobs", str(data)), True)
|
||||
|
||||
|
||||
if "get_default_color" in dir(configuration_file):
|
||||
data = configuration_file.get_default_color()
|
||||
debug.debug(" get default config 'get_default_color' val='" + str(data) + "'")
|
||||
parseGenericArg(arguments.ArgElement("color", str(data)), True)
|
||||
|
||||
|
||||
if "get_default_debug_level" in dir(configuration_file):
|
||||
data = configuration_file.get_default_debug_level()
|
||||
debug.debug(" get default config 'get_default_debug_level' val='" + str(data) + "'")
|
||||
parseGenericArg(arguments.ArgElement("verbose", str(data)), True)
|
||||
|
||||
|
||||
if "get_default_print_pretty" in dir(configuration_file):
|
||||
data = configuration_file.get_default_print_pretty()
|
||||
debug.debug(" get default config 'get_default_print_pretty' val='" + str(data) + "'")
|
||||
parseGenericArg(arguments.ArgElement("pretty", str(data)), True)
|
||||
|
||||
if "get_default_force_optimisation" in dir(configuration_file):
|
||||
data = configuration_file.get_default_force_optimisation()
|
||||
debug.debug(" get default config 'get_default_force_optimisation' val='" + str(data) + "'")
|
||||
parseGenericArg(arguments.ArgElement("force-optimisation", str(data)), True)
|
||||
|
||||
if "get_default_isolate_system" in dir(configuration_file):
|
||||
data = configuration_file.get_default_isolate_system()
|
||||
debug.debug(" get default config 'get_default_isolate_system' val='" + str(data) + "'")
|
||||
parseGenericArg(arguments.ArgElement("isolate-system", str(data)), True)
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user