diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-14 11:52:16 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-14 11:52:16 -0600 |
commit | 41e2af5ad66352fef6fffa4cffa6347bf56bef03 (patch) | |
tree | 5ca947ab5764d16510e3cc0824aff27cd0fea460 /src/makefile/mod.rs | |
parent | 457bcbfd1116f0b3330f9b409395beabffe6ca18 (diff) | |
download | makers-41e2af5ad66352fef6fffa4cffa6347bf56bef03.tar.gz makers-41e2af5ad66352fef6fffa4cffa6347bf56bef03.zip |
define MAKE even if using no-builtins
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(); |