aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/makefile/macro.rs1
-rw-r--r--src/makefile/mod.rs12
2 files changed, 12 insertions, 1 deletions
diff --git a/src/makefile/macro.rs b/src/makefile/macro.rs
index 2dfd84f..af7e354 100644
--- a/src/makefile/macro.rs
+++ b/src/makefile/macro.rs
@@ -369,7 +369,6 @@ fn builtins() -> Vec<(&'static str, TokenString)> {
}
make![
- MAKE=(std::env::current_exe().map_or_else(|_| TokenString::text("makers"), |x| TokenString::text(x.to_string_lossy())))
AR=ar
YACC=yacc
YFLAGS=""
diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs
index 228a170..8c50f41 100644
--- a/src/makefile/mod.rs
+++ b/src/makefile/mod.rs
@@ -55,6 +55,18 @@ impl<'a> Makefile<'a> {
let mut targets = HashMap::new();
let first_non_special_target = None;
+ macros.set(
+ "MAKE".to_owned(),
+ Macro {
+ source: ItemSource::Builtin,
+ text: std::env::current_exe().map_or_else(
+ |_| TokenString::text("makers"),
+ |x| TokenString::text(x.to_string_lossy()),
+ ),
+ #[cfg(feature = "full")]
+ eagerly_expanded: false,
+ },
+ );
if !args.no_builtin_rules {
inference_rules.extend(builtin_inference_rules());
macros.add_builtins();