summaryrefslogtreecommitdiff
path: root/muse
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-02-17 22:21:41 -0800
committerOri Bernstein <ori@eigenstate.org>2017-02-17 23:32:19 -0800
commit61a91a2cc9be621ee517b2cb4114922bd5da351f (patch)
tree2dbf60c0c0d4b03c65c59146f44e4f7c8f1c9cb2 /muse
parent210b24e9cf07baef21fb0fd943f81f38a3196945 (diff)
downloadmc-61a91a2cc9be621ee517b2cb4114922bd5da351f.tar.gz
Search for usefiles relative to the output.
For most uses, this is equivalent to compiler cwd, but supports out of tree builds better. It also means that builds behave the same way regardless of the directory that the compiler is run from, which is convenient for testing. This also drops support for `.use` suffixes on local uses.
Diffstat (limited to 'muse')
-rw-r--r--muse/muse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/muse/muse.c b/muse/muse.c
index ccd8c58..da55e99 100644
--- a/muse/muse.c
+++ b/muse/muse.c
@@ -25,6 +25,7 @@ char **incpaths;
size_t nincpaths;
char **extralibs;
size_t nextralibs;
+char *localincpath;
static void usage(char *prog)
{
@@ -94,6 +95,7 @@ int main(int argc, char **argv)
fprintf(stderr, "output file needed when merging usefiles.\n");
exit(1);
}
+ localincpath = ".";
if (!pkgname)
pkgname = outfile;