mirror of
https://github.com/chocolate-doom/statcheck.git
synced 2024-11-21 12:11:16 +00:00
Add generate dependency on IWAD file
Rather than asserting at dependency build time, this allows some (PWAD) demos to be run without having any of the commercial IWAD files.
This commit is contained in:
parent
4a101e2f3d
commit
10ebb82329
1 changed files with 6 additions and 5 deletions
11
makedepends
11
makedepends
|
@ -14,17 +14,18 @@ for filename in glob("expected/**/*.txt", recursive=True):
|
|||
lmp_file = filename.replace("expected/", "demos/").replace(".txt", ".lmp")
|
||||
cfg = read_config(lmp_file)
|
||||
|
||||
iwad = cfg.get("iwad")
|
||||
assert exists(join("iwads", iwad)), (
|
||||
"IWAD file %r not found in iwads/ directory." % iwad)
|
||||
depends = [join("iwads", cfg["iwad"])]
|
||||
|
||||
pwad = cfg.get("pwad")
|
||||
if pwad is not None:
|
||||
out_file = filename.replace("expected/", "output/")
|
||||
dependencies[out_file] = [os.path.join("extract", pwad)]
|
||||
depends.append(os.path.join("extract", pwad))
|
||||
|
||||
out_file = filename.replace("expected/", "output/")
|
||||
dependencies[out_file] = depends
|
||||
|
||||
with open(depends_file, "w") as f:
|
||||
for out_file, depends in sorted(dependencies.items()):
|
||||
out_file = out_file.replace("#", "\\#")
|
||||
f.write("%s: %s\n" % (
|
||||
out_file, " ".join(depends),
|
||||
))
|
||||
|
|
Loading…
Reference in a new issue