From 41e2af5ad66352fef6fffa4cffa6347bf56bef03 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Wed, 14 Apr 2021 11:52:16 -0600 Subject: define MAKE even if using no-builtins --- src/makefile/macro.rs | 1 - src/makefile/mod.rs | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src/makefile') 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(); -- cgit v1.2.3