summaryrefslogtreecommitdiff
path: root/mbld/deps.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-10-01 23:26:57 -0700
committerOri Bernstein <ori@eigenstate.org>2015-10-02 19:10:43 -0700
commit6799d5048886a3c61b200bf367f305bf8c068164 (patch)
treec0feda885320511f6a95e137cbc9b049ae4cb930 /mbld/deps.myr
parentea60cdb464fe0bb4d289fb841304a44539d24593 (diff)
downloadmc-6799d5048886a3c61b200bf367f305bf8c068164.tar.gz
Propagate extra libraries through the system.
Diffstat (limited to 'mbld/deps.myr')
-rw-r--r--mbld/deps.myr12
1 files changed, 7 insertions, 5 deletions
diff --git a/mbld/deps.myr b/mbld/deps.myr
index 7a00574..66aeb6a 100644
--- a/mbld/deps.myr
+++ b/mbld/deps.myr
@@ -55,7 +55,7 @@ const myrdeps = {b, mt, doclean, addsrc
.seen = std.mkht(std.strhash, std.streq),
.done = std.mkht(std.strhash, std.streq),
.cflags = std.mkht(std.strhash, std.streq),
- .extralibs = [][:],
+ .extlibs = [][:],
.dynamic = false,
])
/* direct dependencies of binary */
@@ -87,7 +87,7 @@ const myrdeps = {b, mt, doclean, addsrc
elif std.hassuffix(srcs[i], ".glue.c")
(cflags, libs) = scrapecflags(b, dg, srcs[i])
std.htput(dg.cflags, srcs[i], cflags)
- dg.extralibs = std.sljoin(dg.extralibs, libs)
+ dg.extlibs = std.sljoin(dg.extlibs, libs)
dg.dynamic = true
;;
;;
@@ -232,7 +232,6 @@ const getcflags = {ln, cflags, libs
match regex.exec(cflagpat, ln)
| `std.None:
| `std.Some m:
- std.put("Got cflags {}\n", m)
flags = std.strtok(m[1])
for fl in flags
cflags = std.slpush(cflags, std.sldup(fl))
@@ -243,7 +242,6 @@ const getcflags = {ln, cflags, libs
match regex.exec(clibpat, ln)
| `std.None:
| `std.Some m:
- std.put("Got libs {}\n", m)
flags = std.strtok(m[1])
for fl in flags
libs = std.slpush(libs, std.sldup(fl))
@@ -315,7 +313,6 @@ const scrapelibs = {dg, lib, incs
->
;;
- deps = [][:]
f = openlib(lib, incs)
match bio.getc(f)
| `std.Some 'U': /* nothing */
@@ -333,12 +330,17 @@ const scrapelibs = {dg, lib, incs
| `std.None: std.fatal("library {}: corrupt or invalid usefile\n", lib)
;;
std.slfree(rdstr(f))
+
done = false
+ deps = [][:]
while !done
match bio.getc(f)
| `std.Some 'L':
d = rdstr(f)
deps = std.slpush(deps, d)
+ | `std.Some 'X':
+ d = rdstr(f)
+ dg.extlibs = std.slpush(dg.extlibs, d)
| `std.Some _: done = true
| `std.None: done = true
;;