summaryrefslogtreecommitdiff
path: root/mbld
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-09 12:53:00 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-09 12:53:00 -0800
commit85434ad4c4b438049f1b55bd681ddea5cd60fbef (patch)
treee20eddf892ac79bb360dc84efce37b13faa556c9 /mbld
parentc5a41d7c6bb10c1f384cce78953355b1c0c1e6f2 (diff)
downloadmc-85434ad4c4b438049f1b55bd681ddea5cd60fbef.tar.gz
Search the default path for a library.
We had missed a couple of search paths.
Diffstat (limited to 'mbld')
-rw-r--r--mbld/build.myr7
-rw-r--r--mbld/deps.myr6
2 files changed, 12 insertions, 1 deletions
diff --git a/mbld/build.myr b/mbld/build.myr
index 2abdc5e..5c5f758 100644
--- a/mbld/build.myr
+++ b/mbld/build.myr
@@ -438,6 +438,12 @@ const findlib = {lib, incs
;;
std.slfree(p)
;;
+
+ p = std.pathjoin([opt_instroot, config.Libpath, lib][:])
+ if std.fexists(p)
+ -> `std.Some p
+ ;;
+ std.slfree(p)
-> `std.None
}
@@ -459,6 +465,7 @@ const freshlibs = {targ, libgraph
for inc in targ.incpath
std.fput(1, "\t{}\n", inc)
;;
+ std.fput(1, "\t{}/{}\n", opt_instroot, config.Libpath)
std.exit(1)
;;
;;
diff --git a/mbld/deps.myr b/mbld/deps.myr
index 5ce5876..a168c19 100644
--- a/mbld/deps.myr
+++ b/mbld/deps.myr
@@ -374,7 +374,11 @@ const openlib = {lib, incs
| `std.Ok file: -> file
| `std.Fail m: /* nothing */
;;
- std.fatal("could not find library {}.\n", lib)
+ std.put("could not find library {} in search path:\n", lib)
+ for p in incs
+ std.put("\t{}\n", p)
+ ;;
+ std.fatal("\t{}\n", config.Libpath)
}
/* pushes a dep into the dependency list */