if src.product.product_is_cpp(mm):
# cpp module
for aa in src.product.get_product_components(mm):
- install_dir = os.path.join(config.APPLICATION.workdir,
- "INSTALL")
+ install_dir=os.path.join(config.APPLICATION.workdir,
+ config.INTERNAL.config.install_dir)
mp = os.path.join(install_dir, aa)
flagline = add_module_to_appli(f,
aa,
generate_dir = os.path.join(workdir, "GENERATED")
source_dir = os.path.join(generate_dir, compo + "_SRC")
build_dir = os.path.join(os.path.join(workdir, "BUILD"), compo)
- install_dir = os.path.join(os.path.join(workdir, "INSTALL"), compo)
+ install_dir = os.path.join(workdir, config.INTERNAL.config.install_dir,
+ compo)
l_dir_install.append(src.Path(source_dir))
l_dir_install.append(src.Path(build_dir))
l_dir_install.append(src.Path(install_dir))
loop_cmd = "for f in $(grep -RIl"
for key in d_sub:
loop_cmd += " -e "+ key
- loop_cmd += ' INSTALL); do\n sed -i "\n'
+ loop_cmd += ' ' + config.INTERNAL.config.install_dir +\
+ '); do\n sed -i "\n'
for key in d_sub:
loop_cmd += " s?" + key + "?$(pwd)/" + d_sub[key] + "?g\n"
loop_cmd += ' " $f\ndone'
d={}
d["BINARIES_DIR"] = binaries_dir_name
d["SUBSTITUTION_LOOP"]=loop_cmd
+ d["INSTALL_DIR"]=config.INTERNAL.config.install_dir
# substitute the template and write it in file
content=src.template.substitute(installbin_template_path, d)
# cpp module
for name_cpp in src.product.get_product_components(prod_info):
install_dir = os.path.join(config.APPLICATION.workdir,
- "INSTALL", name_cpp)
+ config.INTERNAL.config.install_dir,
+ name_cpp)
if os.path.exists(install_dir):
l_install_dir.append((name_cpp, install_dir))
else:
for key in d_bin_files_to_add:
if key.endswith("(bin)"):
source_dir = d_bin_files_to_add[key][0]
- path_in_archive = d_bin_files_to_add[key][1].replace("BINARIES-" + runner.cfg.VARS.dist,"INSTALL")
+ path_in_archive = d_bin_files_to_add[key][1].replace("BINARIES-" +\
+ runner.cfg.VARS.dist,runner.cfg.INTERNAL.config.install_dir)
if os.path.basename(source_dir)==os.path.basename(path_in_archive):
# if basename is the same we will just substitute the dirname
d_paths_to_substitute[os.path.dirname(source_dir)]=\
source_dir_save = pi.source_dir
name_save = pi.name
pi.install_dir = os.path.join(self.cfg.APPLICATION.workdir,
- "INSTALL",
+ config.INTERNAL.config.install_dir,
pi.component_name)
if self.for_package:
pi.install_dir = os.path.join("out_dir_Path",
#
# This script copies BINARIES content into INSTALL, and substitute paths to enable extra compilation.
# If INSTALL already exists : does nothing!
-if [ -d INSTALL ]
+if [ -d ¤{INSTALL_DIR} ]
then
- echo Warning: INSTALL already exists! Please rename or delete it before executing this script
+ echo Warning: ¤{INSTALL_DIR} already exists! Please rename or delete it before executing this script
exit
fi
if [ ! -d ¤{BINARIES_DIR} ]
echo Error: ¤{BINARIES_DIR} directory not found!
exit
fi
-mkdir INSTALL
-echo copies ¤{BINARIES_DIR} into INSTALL
-cp -RP ¤{BINARIES_DIR}/* INSTALL
+mkdir ¤{INSTALL_DIR}
+echo copies ¤{BINARIES_DIR} into ¤{INSTALL_DIR}
+cp -RP ¤{BINARIES_DIR}/* ¤{INSTALL_DIR}
echo does the substitutions
# do the required substitutions
¤{SUBSTITUTION_LOOP}
config :
{
copy_prefix : "LOCAL_"
+ install_dir : "INSTALL"
}
log :
{
if "install_dir" not in prod_info or prod_info.install_dir == "base":
# Set it to the default value (in application directory)
install_dir = os.path.join(config.APPLICATION.workdir,
- "INSTALL",
- prod_info.name)
+ config.INTERNAL.config.install_dir,
+ prod_info.name)
else:
install_dir = prod_info.install_dir