summaryrefslogtreecommitdiff
path: root/myrbuild
diff options
context:
space:
mode:
authorOri Bernstein <orib@google.com>2012-10-01 13:33:30 -0400
committerOri Bernstein <orib@google.com>2012-10-01 13:33:30 -0400
commit8ba9576c691e652534586d8ea337b20aef34eb49 (patch)
treebae9b812c66b4f50dd64be600e75e19582064ad5 /myrbuild
parentc3385258255b61bdfc24f194c8d7104b57a33102 (diff)
downloadmc-8ba9576c691e652534586d8ea337b20aef34eb49.tar.gz
Merging usefiles works on .use, not .o
Diffstat (limited to 'myrbuild')
-rw-r--r--myrbuild/myrbuild.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/myrbuild/myrbuild.c b/myrbuild/myrbuild.c
index 759bb07..e3ff37a 100644
--- a/myrbuild/myrbuild.c
+++ b/myrbuild/myrbuild.c
@@ -208,13 +208,12 @@ void mergeuse(char **files, size_t nfiles)
lappend(&args, &nargs, strdup("-mo"));
lappend(&args, &nargs, strdup(libname));
for (i = 0; i < nfiles; i++) {
- if (hassuffix(files[i], ".myr"))
- swapsuffix(buf, sizeof buf, files[i], ".myr", ".o");
- else if (hassuffix(files[i], ".s"))
- swapsuffix(buf, sizeof buf, files[i], ".s", ".o");
- else
+ if (hassuffix(files[i], ".myr")) {
+ swapsuffix(buf, sizeof buf, files[i], ".myr", ".use");
+ lappend(&args, &nargs, strdup(buf));
+ } else if (!hassuffix(files[i], ".s")) {
die("Unknown file type %s", files[i]);
- lappend(&args, &nargs, strdup(buf));
+ }
}
lappend(&args, &nargs, NULL);