Skip to content

Commit

Permalink
Add make wads target.
Browse files Browse the repository at this point in the history
Used by wadptr's continuous integration.
  • Loading branch information
fragglet committed Sep 16, 2024
1 parent 5b67efb commit e019fe8
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions makerules
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,17 @@ class Rule:
.replace(".txt", ".lmp"))
self.cfg = read_config(self.lmp_file)

def wads(self):
yield join("extract", self.cfg["iwad"])
pwad = self.cfg.get("pwad")
if pwad is not None:
yield join("extract", pwad)

def dependencies(self):
yield self.lmp_file
yield "$(SOURCE_PORT)"
yield join("iwads", self.cfg["iwad"])
yield from self.wads()

pwad = self.cfg.get("pwad")
if pwad is not None:
yield join("extract", pwad)
deh = self.cfg.get("deh")
if deh is not None:
yield join("extract", deh)
Expand Down Expand Up @@ -91,8 +94,12 @@ class Rule:

depends_file = sys.argv[1]
rules = []
all_wads = set()

with open(depends_file, "w") as f:
for filename in sorted(glob("expected/**/*.txt", recursive=True)):
r = Rule(filename)
f.write(r.rule_output())
all_wads = all_wads | set(r.wads())

f.write("wads: %s\n" % shlex.join(all_wads))

0 comments on commit e019fe8

Please sign in to comment.