diff --git a/scripts/compilation/qp_create_ninja.py b/scripts/compilation/qp_create_ninja.py index a1cd7dad..52f06f7b 100755 --- a/scripts/compilation/qp_create_ninja.py +++ b/scripts/compilation/qp_create_ninja.py @@ -86,7 +86,9 @@ def ninja_create_env_variable(pwd_config_file): FC, FCFLAGS, IRPF90, IRPF90_FLAGS The env variable is usefull for the generation of EZFIO, and IRPF90 """ - l_string = [] + l_string = ["builddir = {0}".format(os.path.dirname(ROOT_BUILD_NINJA)), + ""] + for flag in ["FC", "FCFLAGS", "IRPF90", "IRPF90_FLAGS"]: str_ = "{0} = {1}".format(flag, get_compilation_option(pwd_config_file, flag)) @@ -722,11 +724,13 @@ def ninja_dot_tree_build(path_module, l_module): # | | (_) (_| |_| | (/_ # def create_build_ninja_module(path_module): - - l_string = ["rule update_build_ninja_root", - " command = {0} update".format(__file__), + l_string = ["builddir = {0}".format(os.path.dirname(ROOT_BUILD_NINJA)), ""] + l_string += ["rule update_build_ninja_root", + " command = {0} update".format(__file__), + ""] + l_string += ["rule make_local_binaries", " command = ninja -f {0} module_{1}".format( ROOT_BUILD_NINJA, path_module.rel), " pool = console", @@ -755,6 +759,8 @@ def create_build_ninja_module(path_module): def create_build_ninja_global(): + l_string = ["builddir = {0}".format(os.path.dirname(ROOT_BUILD_NINJA)), + ""] l_string = ["rule update_build_ninja_root", " command = {0} update".format(__file__), @@ -942,6 +948,6 @@ if __name__ == "__main__": # S a v e s # # ~#~#~#~#~ # - with open(join(QP_ROOT, "config", "build.ninja"), "w+") as f: + with open(ROOT_BUILD_NINJA, "w+") as f: f.write(header) f.write("\n".join(l_string)) diff --git a/scripts/module/qp_install_module.py b/scripts/module/qp_install_module.py index 541fdf9f..1c9911a6 100755 --- a/scripts/module/qp_install_module.py +++ b/scripts/module/qp_install_module.py @@ -23,7 +23,7 @@ try: from module_handler import ModuleHandler, get_dict_child from module_handler import get_l_module_descendant from update_README import Doc_key, Needed_key - from qp_path import QP_SRC, QP_PLUGINS + from qp_path import QP_SRC, QP_PLUGINS, QP_ROOT except ImportError: print "Please check if you have sourced the .quantum_package.rc" print "(`source .quantum_package.rc`)" @@ -163,9 +163,11 @@ if __name__ == '__main__': subprocess.check_call(["qp_create_ninja.py", "update"]) except: raise - - print "Done" + + print "[ OK ]" print "You can now compile as usual" + print "`cd {0} ; ninja` for exemple".format(QP_ROOT) + print " or --in developement mode-- you can cd in a directory and compile here" elif arguments["uninstall"]: