diff options
Diffstat (limited to 'src/makefile/mod.rs')
-rw-r--r-- | src/makefile/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
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(); |