mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-24 11:11:02 -07:00
Update ab.
This commit is contained in:
@@ -26,7 +26,7 @@ def main():
|
||||
print("link", sf)
|
||||
os.makedirs(dirname(sf), exist_ok=True)
|
||||
try:
|
||||
os.link(abspath(f), sf)
|
||||
os.symlink(abspath(f), sf)
|
||||
except PermissionError:
|
||||
shutil.copy(f, sf)
|
||||
|
||||
@@ -38,6 +38,11 @@ def main():
|
||||
df = dirname(f)
|
||||
if df:
|
||||
os.makedirs(df, exist_ok=True)
|
||||
|
||||
try:
|
||||
os.remove(f)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
os.rename(sf, f)
|
||||
|
||||
|
||||
|
||||
17
build/ab.py
17
build/ab.py
@@ -501,15 +501,11 @@ def emit_rule(self, ins, outs, cmds=[], label=None):
|
||||
|
||||
emit(f"OUTS_{outsn}", "=", *fouts, into=lines)
|
||||
emit(f"INS_{insn}", "=", *fins, into=lines)
|
||||
emit(
|
||||
name,
|
||||
":",
|
||||
hashfile,
|
||||
f"$(OUTS_{outsn})",
|
||||
into=lines,
|
||||
)
|
||||
emit(f"$(OUTS_{outsn})", ":", hashfile, into=lines)
|
||||
emit(hashfile, ":", f"$(INS_{insn})", into=lines)
|
||||
emit(name, ":", f"$(OUTS_{outsn})")
|
||||
emit(hashfile, ":")
|
||||
emit(f"\t@mkdir -p {self.dir}")
|
||||
emit(f"\t@touch {hashfile}")
|
||||
emit(f"$(OUTS_{outsn})", "&:",f"$(INS_{insn})", hashfile, into=lines)
|
||||
|
||||
if label:
|
||||
emit("\t$(hide)", "$(ECHO) $(PROGRESSINFO)" + label, into=lines)
|
||||
@@ -537,9 +533,6 @@ def emit_rule(self, ins, outs, cmds=[], label=None):
|
||||
emit(name, ":", *fins, into=lines)
|
||||
|
||||
outputFp.write("".join(lines))
|
||||
|
||||
if outs:
|
||||
emit(f"\t$(hide) touch {hashfile}")
|
||||
emit("")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user