From 33ca5e1018f3bbb5e695e6ee558f5dac0753b271 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 19 May 2021 18:36:43 +0200 Subject: [PATCH] Shorten lines in ninja file --- src/ninja.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ninja.py b/src/ninja.py index 9d17fd6..14803cf 100644 --- a/src/ninja.py +++ b/src/ninja.py @@ -55,7 +55,8 @@ def dress(f,in_root=False): result = os.path.join(cwd,f) else: result = os.path.join(cwd,irpdir,f) - return os.path.normpath(result) + result = os.path.normpath(result) + return result def create_build_touches(list_of_other_o): @@ -405,8 +406,12 @@ def run(): output.append(create_build_remaining(i)) + text = '\n\n'.join(output) + text = text.replace(cwd+"/IRPF90_temp","$T") + text = text.replace(cwd,"$X") with open(FILENAME,'w') as f: - f.write('\n\n'.join(output)) + f.write("X="+cwd+"\nT="+cwd+"/IRPF90_temp\n") + f.write(text) f.write('\n') create_irpf90_make([ x.filename for x in l_targets ] + [ os.path.join(irpdir,'irpf90.a') ] )