aboutsummaryrefslogtreecommitdiff
path: root/src/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile')
-rw-r--r--src/makefile/macro.rs9
1 files changed, 6 insertions, 3 deletions
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=""