We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5293e1c commit 8e5d52fCopy full SHA for 8e5d52f
2 files changed
build/_sandbox.py
@@ -26,7 +26,7 @@ def main():
26
print("link", sf)
27
os.makedirs(dirname(sf), exist_ok=True)
28
try:
29
- os.link(abspath(f), sf)
+ os.symlink(abspath(f), sf)
30
except PermissionError:
31
shutil.copy(f, sf)
32
@@ -38,6 +38,11 @@ def main():
38
df = dirname(f)
39
if df:
40
os.makedirs(df, exist_ok=True)
41
+
42
+ try:
43
+ os.remove(f)
44
+ except FileNotFoundError:
45
+ pass
46
os.rename(sf, f)
47
48
build/ab.py
@@ -501,15 +501,11 @@ def emit_rule(self, ins, outs, cmds=[], label=None):
501
502
emit(f"OUTS_{outsn}", "=", *fouts, into=lines)
503
emit(f"INS_{insn}", "=", *fins, into=lines)
504
- emit(
505
- name,
506
- ":",
507
- hashfile,
508
- f"$(OUTS_{outsn})",
509
- into=lines,
510
- )
511
- emit(f"$(OUTS_{outsn})", ":", hashfile, into=lines)
512
- 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)
513
514
if label:
515
emit("\t$(hide)", "$(ECHO) $(PROGRESSINFO)" + label, into=lines)
@@ -537,9 +533,6 @@ def emit_rule(self, ins, outs, cmds=[], label=None):
537
533
emit(name, ":", *fins, into=lines)
538
534
539
535
outputFp.write("".join(lines))
540
-
541
- if outs:
542
- emit(f"\t$(hide) touch {hashfile}")
543
536
emit("")
544
545
0 commit comments