From c9cc973f6ea1184b962bc11420f4cd9d9a194c6e Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 4 Apr 2021 11:56:42 -0600 Subject: point MAKE builtin macro at full path, not just name --- src/makefile/macro.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/makefile/macro.rs b/src/makefile/macro.rs index 831ec5e..0ab1b4b 100644 --- a/src/makefile/macro.rs +++ b/src/makefile/macro.rs @@ -193,20 +193,23 @@ fn builtins() -> Vec<(&'static str, TokenString)> { // Fuck it, might as well. macro_rules! handle { ($value:ident) => { - stringify!($value) + stringify!($value).parse().unwrap() }; ($value:literal) => { + $value.parse().unwrap() + }; + ($value:expr) => { $value }; } macro_rules! make { ($($name:ident=$value:tt)+) => {vec![$( - (stringify!($name), handle!($value).parse().unwrap()) + (stringify!($name), handle!($value)) ),+]}; } make![ - MAKE=makers + MAKE=(std::env::current_exe().map_or_else(|_| TokenString::text("makers"), |x| TokenString::text(x.to_string_lossy()))) AR=ar YACC=yacc YFLAGS="" -- cgit v1.2.3