aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile/mod.rs')
-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 {