mirror of
https://github.com/chocolate-doom/quickcheck.git
synced 2024-11-22 04:21:33 +00:00
Add make wads
target.
Used by wadptr's continuous integration.
This commit is contained in:
parent
5b67efbb05
commit
e019fe8762
1 changed files with 12 additions and 5 deletions
17
makerules
17
makerules
|
@ -42,14 +42,17 @@ class Rule:
|
||||||
.replace(".txt", ".lmp"))
|
.replace(".txt", ".lmp"))
|
||||||
self.cfg = read_config(self.lmp_file)
|
self.cfg = read_config(self.lmp_file)
|
||||||
|
|
||||||
def dependencies(self):
|
def wads(self):
|
||||||
yield self.lmp_file
|
yield join("extract", self.cfg["iwad"])
|
||||||
yield "$(SOURCE_PORT)"
|
|
||||||
yield join("iwads", self.cfg["iwad"])
|
|
||||||
|
|
||||||
pwad = self.cfg.get("pwad")
|
pwad = self.cfg.get("pwad")
|
||||||
if pwad is not None:
|
if pwad is not None:
|
||||||
yield join("extract", pwad)
|
yield join("extract", pwad)
|
||||||
|
|
||||||
|
def dependencies(self):
|
||||||
|
yield self.lmp_file
|
||||||
|
yield "$(SOURCE_PORT)"
|
||||||
|
yield from self.wads()
|
||||||
|
|
||||||
deh = self.cfg.get("deh")
|
deh = self.cfg.get("deh")
|
||||||
if deh is not None:
|
if deh is not None:
|
||||||
yield join("extract", deh)
|
yield join("extract", deh)
|
||||||
|
@ -91,8 +94,12 @@ class Rule:
|
||||||
|
|
||||||
depends_file = sys.argv[1]
|
depends_file = sys.argv[1]
|
||||||
rules = []
|
rules = []
|
||||||
|
all_wads = set()
|
||||||
|
|
||||||
with open(depends_file, "w") as f:
|
with open(depends_file, "w") as f:
|
||||||
for filename in sorted(glob("expected/**/*.txt", recursive=True)):
|
for filename in sorted(glob("expected/**/*.txt", recursive=True)):
|
||||||
r = Rule(filename)
|
r = Rule(filename)
|
||||||
f.write(r.rule_output())
|
f.write(r.rule_output())
|
||||||
|
all_wads = all_wads | set(r.wads())
|
||||||
|
|
||||||
|
f.write("wads: %s\n" % shlex.join(all_wads))
|
||||||
|
|
Loading…
Reference in a new issue