mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 11:53:32 +01:00
build.ninja is back into IRPF90_temp
This commit is contained in:
parent
4dbab0e6fe
commit
5d7562fd0a
16
src/ninja.py
16
src/ninja.py
@ -33,7 +33,7 @@ irpdir = irpf90_t.irpdir
|
|||||||
mandir = irpf90_t.mandir
|
mandir = irpf90_t.mandir
|
||||||
irp_id = irpf90_t.irp_id
|
irp_id = irpf90_t.irp_id
|
||||||
|
|
||||||
FILENAME = "build.ninja"
|
FILENAME = os.path.join(irpdir,"build.ninja")
|
||||||
|
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
|
|
||||||
@ -130,8 +130,6 @@ def create_build_target(t,list_of_other_o):
|
|||||||
" short_in = {short_target_module_F90}",
|
" short_in = {short_target_module_F90}",
|
||||||
" short_out = {short_target_module_o}",
|
" short_out = {short_target_module_o}",
|
||||||
"",
|
"",
|
||||||
"build {short_target}: phony {target}",
|
|
||||||
"",
|
|
||||||
] )
|
] )
|
||||||
|
|
||||||
result = result.format(
|
result = result.format(
|
||||||
@ -239,7 +237,9 @@ def create_build_remaining(f):
|
|||||||
|
|
||||||
def create_irpf90_make(targets):
|
def create_irpf90_make(targets):
|
||||||
targets = ' '.join(targets)
|
targets = ' '.join(targets)
|
||||||
result = """TARGETS={1}
|
result = """NINJA += -C {0}
|
||||||
|
|
||||||
|
TARGETS={1}
|
||||||
|
|
||||||
.PHONY: all clean veryclean
|
.PHONY: all clean veryclean
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ all:
|
|||||||
$(NINJA)
|
$(NINJA)
|
||||||
|
|
||||||
$(TARGETS):
|
$(TARGETS):
|
||||||
$(NINJA) $@
|
$(NINJA) $(PWD)/$@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(NINJA) -t clean
|
$(NINJA) -t clean
|
||||||
@ -280,7 +280,7 @@ def run():
|
|||||||
try: CXX = os.environ["CXX"]
|
try: CXX = os.environ["CXX"]
|
||||||
except KeyError: CXX="g++"
|
except KeyError: CXX="g++"
|
||||||
|
|
||||||
includes = [ "-I %s "%(os.path.join(irpdir,i)) for i in command_line.include_dir ]
|
includes = [ "-I %s"%(i) for i in command_line.include_dir ]
|
||||||
|
|
||||||
FC += " "+' '.join(includes)
|
FC += " "+' '.join(includes)
|
||||||
CC += " "+' '.join(includes)
|
CC += " "+' '.join(includes)
|
||||||
@ -312,11 +312,11 @@ def run():
|
|||||||
# Rules
|
# Rules
|
||||||
|
|
||||||
t = [ "rule compile_fortran_{id}",
|
t = [ "rule compile_fortran_{id}",
|
||||||
" command = cd $builddir ; {FC} {FCFLAGS} -c $in -o $out",
|
" command = {FC} {FCFLAGS} -c $in -o $out",
|
||||||
" description = F : $short_in -> $short_out",
|
" description = F : $short_in -> $short_out",
|
||||||
"",
|
"",
|
||||||
"rule compile_touches_{id}",
|
"rule compile_touches_{id}",
|
||||||
" command = cd $builddir ; {FC} -c $in -o $out",
|
" command = {FC} -c $in -o $out",
|
||||||
" description = F : $short_in -> $short_out",
|
" description = F : $short_in -> $short_out",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
|
@ -1 +1 @@
|
|||||||
version = "1.6.6"
|
version = "1.6.7"
|
||||||
|
Loading…
Reference in New Issue
Block a user