From ade0629bc862004bcc069345ec91aa0142c1f257 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 11 Apr 2021 18:41:18 -0600 Subject: add $^ for all prerequisites --- src/makefile/macro.rs | 2 +- src/makefile/mod.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/makefile/macro.rs b/src/makefile/macro.rs index 3444e2c..fc3be51 100644 --- a/src/makefile/macro.rs +++ b/src/makefile/macro.rs @@ -221,7 +221,7 @@ impl<'parent, 'lookup> Set<'parent, 'lookup> { let name = self .expand(name) .wrap_err_with(|| format!("while expanding \"{}\"", name))?; - let internal_macro_names = &['@', '?', '<', '*'][..]; + let internal_macro_names = &['@', '?', '<', '*', '^'][..]; let internal_macro_suffices = &['D', 'F'][..]; let just_internal = name.len() == 1 && name.starts_with(internal_macro_names); let suffixed_internal = name.len() == 2 diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs index ac6090e..eb06939 100644 --- a/src/makefile/mod.rs +++ b/src/makefile/mod.rs @@ -348,6 +348,8 @@ impl<'a> Makefile<'a> { // The $* macro shall evaluate to the current target name with // its suffix deleted. (GNUism: the match stem) vec![target.stem.as_ref().unwrap_or(&target.name).to_owned()] + } else if macro_name.starts_with('^') { + target.prerequisites.clone() } else { unreachable!() }; -- cgit v1.2.3