aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-05 12:56:43 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-05 12:56:43 -0600
commit8b5579ad7e4154931e468130ccc35c98c2e1d578 (patch)
treeb9c44937868842cb14c9e87ea7e67c676d90ee24
parent78a1b253af669858baf58c848e0141150ba3e1c4 (diff)
downloadmakers-8b5579ad7e4154931e468130ccc35c98c2e1d578.tar.gz
makers-8b5579ad7e4154931e468130ccc35c98c2e1d578.zip
set `CURDIR`
-rw-r--r--src/makefile/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs
index edc9b6b..308d25d 100644
--- a/src/makefile/mod.rs
+++ b/src/makefile/mod.rs
@@ -76,6 +76,14 @@ impl<'a> Makefile<'a> {
MacroSource::Builtin,
TokenString::text(make_cmd_goals.join(" ")),
);
+
+ if let Ok(curdir) = env::current_dir() {
+ macros.set(
+ "CURDIR".to_owned(),
+ MacroSource::Builtin,
+ TokenString::text(curdir.to_string_lossy()),
+ );
+ }
}
Makefile {