summaryrefslogtreecommitdiff
path: root/mbld
diff options
context:
space:
mode:
authorOri Bernstein <ori@foo.hsd1.ca.comcast.net>2016-09-23 16:07:15 -0700
committerOri Bernstein <ori@foo.hsd1.ca.comcast.net>2016-09-23 16:07:15 -0700
commit25bdeed20e3d0915bca71d488b9d7bcda07c4109 (patch)
treedaa1a596a524b4c69a277b43bc2c935cffad3389 /mbld
parent6109f4b305d077fa88ab65fbdc728527ef4478d9 (diff)
downloadmc-25bdeed20e3d0915bca71d488b9d7bcda07c4109.tar.gz
Use the first dot as the suffix.
Support for .glue.c; maybe we can do better.
Diffstat (limited to 'mbld')
-rw-r--r--mbld/util.myr4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbld/util.myr b/mbld/util.myr
index 498d82d..443d127 100644
--- a/mbld/util.myr
+++ b/mbld/util.myr
@@ -53,7 +53,7 @@ const srcsplit = {src
platf = ""
suff = ""
- match std.strrfind(src, ".")
+ match std.strfind(src, ".")
| `std.Some i:
suff = src[i:]
src = src[:i]
@@ -86,7 +86,7 @@ const srcswapsuffix = {src, new
-> std.strcat(base, new)
elif std.hassuffix(suff, ".s")
-> std.strcat(base, new)
- elif std.hassuffix(suff, ".glue.c")
+ elif std.hassuffix(base, ".glue.c")
-> std.strjoin([base, ".glue", new][:], "")
else
std.fatal("unrecognized source {}\n", src)