From f43f5b4861492d7c3642f662b0fa2abea5c3ca5c Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Mon, 16 Dec 2024 21:24:07 -0700 Subject: lie about features to pass Linux make version check --- src/makefile/macro.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/makefile/macro.rs b/src/makefile/macro.rs index 3b472a3..d27cbfa 100644 --- a/src/makefile/macro.rs +++ b/src/makefile/macro.rs @@ -197,7 +197,15 @@ impl Default for Set { fn builtins() -> Vec<(&'static str, TokenString)> { // Fuck it, might as well. - macro_rules! handle { + macro_rules! handle_key { + ($key:ident) => { + stringify!($key) + }; + ($key:literal) => { + $key + }; + } + macro_rules! handle_value { ($value:ident) => { stringify!($value).parse().unwrap() }; @@ -209,8 +217,8 @@ fn builtins() -> Vec<(&'static str, TokenString)> { }; } macro_rules! make { - ($($name:ident=$value:tt)+) => {vec![$( - (stringify!($name), handle!($value)) + ($($name:tt=$value:tt)+) => {vec![$( + (handle_key!($name), handle_value!($value)) ),+]}; } @@ -243,6 +251,9 @@ fn builtins() -> Vec<(&'static str, TokenString)> { ARFLAGS="rv" CFLAGS="" FFLAGS="" + + // yes, Linux, this is definitely GNU Make 4.0+ + ".FEATURES"="output-sync" ] } -- cgit v1.2.3