mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-23 12:56:14 +01:00
Cleaning makefile
This commit is contained in:
parent
65574036cd
commit
6e182577e3
@ -21,9 +21,6 @@ do
|
|||||||
# Update Makefile.depend
|
# Update Makefile.depend
|
||||||
${QPACKAGE_ROOT}/scripts/module/check_module.sh
|
${QPACKAGE_ROOT}/scripts/module/check_module.sh
|
||||||
|
|
||||||
# Update Makefile.depend
|
|
||||||
${QPACKAGE_ROOT}/scripts/module/module_handler.py save_makefile_depend
|
|
||||||
|
|
||||||
# Update EZFIO interface (create the irp.f90 and the ocaml)
|
# Update EZFIO interface (create the irp.f90 and the ocaml)
|
||||||
${QPACKAGE_ROOT}/scripts/ezfio_interface/ei_handler.py --irpf90 --ocaml
|
${QPACKAGE_ROOT}/scripts/ezfio_interface/ei_handler.py --irpf90 --ocaml
|
||||||
|
|
||||||
|
@ -165,11 +165,21 @@ def get_list_depend(l_module):
|
|||||||
def save_makefile_depend(l_src, l_obj):
|
def save_makefile_depend(l_src, l_obj):
|
||||||
header = "# This file was created by the module_handler.py script. Do not modify it by hand."
|
header = "# This file was created by the module_handler.py script. Do not modify it by hand."
|
||||||
|
|
||||||
with open("Makefile.depend", "w") as f:
|
try:
|
||||||
f.write(header + "\n"*2)
|
with open("Makefile.depend", "r") as f:
|
||||||
f.write("SRC+= {0}".format(" ".join(l_src)) + "\n")
|
old_output = f.read()
|
||||||
f.write("OBJ+= {0}".format(" ".join(l_obj)) + "\n")
|
except IOError:
|
||||||
f.write("\n")
|
old_output = None
|
||||||
|
|
||||||
|
output = "\n".join([header,
|
||||||
|
"\n",
|
||||||
|
"SRC+= {0}".format(" ".join(l_src)),
|
||||||
|
"OBJ+= {0}".format(" ".join(l_obj)),
|
||||||
|
"\n"])
|
||||||
|
|
||||||
|
if output != old_output:
|
||||||
|
with open("Makefile.depend", "w+") as f:
|
||||||
|
f.write(output)
|
||||||
|
|
||||||
|
|
||||||
def create_png_from_path(path):
|
def create_png_from_path(path):
|
||||||
|
@ -24,7 +24,6 @@ NEEDED_CHILDREN_MODULES=$(shell module_handler.py print_genealogy)
|
|||||||
# Check and update dependencies
|
# Check and update dependencies
|
||||||
include Makefile.depend
|
include Makefile.depend
|
||||||
|
|
||||||
|
|
||||||
# Define the Makefile common variables
|
# Define the Makefile common variables
|
||||||
EZFIO_DIR=$(QPACKAGE_ROOT)/EZFIO
|
EZFIO_DIR=$(QPACKAGE_ROOT)/EZFIO
|
||||||
EZFIO=$(EZFIO_DIR)/lib/libezfio_irp.a
|
EZFIO=$(EZFIO_DIR)/lib/libezfio_irp.a
|
||||||
@ -36,7 +35,11 @@ clean_links:
|
|||||||
LIB+=$(EZFIO) $(MKL)
|
LIB+=$(EZFIO) $(MKL)
|
||||||
IRPF90+=$(patsubst %, -I %, $(INCLUDE_DIRS)) $(IRPF90_FLAGS)
|
IRPF90+=$(patsubst %, -I %, $(INCLUDE_DIRS)) $(IRPF90_FLAGS)
|
||||||
|
|
||||||
irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile $(EZFIO) NEEDED_CHILDREN_MODULES $(wildcard *.py)
|
# Update Makefile.depend
|
||||||
|
Makefile.depend: $(wildcart */Makefile)
|
||||||
|
${QPACKAGE_ROOT}/scripts/module/module_handler.py save_makefile_depend
|
||||||
|
|
||||||
|
irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile.depend Makefile $(EZFIO) NEEDED_CHILDREN_MODULES $(wildcard *.py)
|
||||||
- $(IRPF90)
|
- $(IRPF90)
|
||||||
- update_README.py
|
- update_README.py
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user