path: root/mbld/clean.myr
diff options
authorOri Bernstein <>2015-04-16 14:13:47 -0700
committerOri Bernstein <>2015-04-16 14:13:47 -0700
commit9df78d333d4fcc74754e16ddf06c2fba58c9858a (patch)
tree03f1f12dcd4cb74f0e6cc4fd63b95f9234b4ec5a /mbld/clean.myr
parentb7747c5a3d36f99514b1945efb05b9f04f7dc74a (diff)
Push/pop directories appropriately.
We had bugs because this was done by just setting dirs, without properly changing back at the end of a command. Ordering of build targets would break builds.
Diffstat (limited to 'mbld/clean.myr')
1 files changed, 2 insertions, 1 deletions
diff --git a/mbld/clean.myr b/mbld/clean.myr
index 89e595b..5452ae5 100644
--- a/mbld/clean.myr
+++ b/mbld/clean.myr
@@ -70,7 +70,7 @@ const cleanup = {b, targ, leaves, islib
we want to automatically add 'clean' sources since otherwise,
mbld won't be able to clean code after changing a build file.
- setdir(b, targ.dir)
+ pushdir(b, targ.dir)
if !myrdeps(b, targ, islib, true, true, &dg)
std.fatal(1, "Could not load dependencies for %s\n",
@@ -85,5 +85,6 @@ const cleanup = {b, targ, leaves, islib
std.put("\tclean %s\n", k)
+ popdir(b)