ref: 6f41b62328e1ba8de60d6057862e828801717555
parent: c1f1a21283b799f9f98415d8e25a2212911214f9
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Mar 3 06:19:08 EST 2015
Check the correct thing in inputs. The output file is guaranteed to be in inputs, but the source file is not. Use the output file.
--- a/deps.myr
+++ b/deps.myr
@@ -104,7 +104,10 @@
if std.hthas(g.done, path)
->
- elif std.htgetv(g.seen, path, false)
+ ;;
+
+ depstk# = std.slpush(depstk#, path)
+ if std.htgetv(g.seen, path, false)
std.fput(1, "dependency loop involving %s:\n", path)
for d in depstk#
std.fput(1, "\t%s\n", d)
@@ -111,7 +114,6 @@
;;
std.exit(1)
;;
- depstk# = std.slpush(depstk#, path)
deps = getdeps(p, path)
std.htput(g.seen, path, true)
for d in deps
@@ -158,7 +160,7 @@
src = swapsuffix(usefile, ".use", ".myr")
if addsrc
std.htput(g.sources, src, true)
- elif !std.hthas(g.input, src)
+ elif !std.hthas(g.input, usefile)
std.fatal(1, "%s: source file %s not listed in bldfile\n", f, src)
;;
;;