From eec876fe50ff9b6333109fe717cd50ba2d4781c7 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sat, 3 Apr 2021 21:55:02 -0600 Subject: deprioritize builtin inference rules --- src/makefile/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/makefile') diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs index ecadf72..f62249b 100644 --- a/src/makefile/mod.rs +++ b/src/makefile/mod.rs @@ -31,6 +31,7 @@ use token::TokenString; pub struct Makefile<'a> { inference_rules: Vec, + builtin_inference_rules: Vec, pub macros: MacroSet<'static, 'static>, targets: RefCell>>>, pub first_non_special_target: Option, @@ -69,7 +70,8 @@ impl<'a> Makefile<'a> { } Makefile { - inference_rules, + inference_rules: vec![], + builtin_inference_rules: inference_rules, macros, targets: RefCell::new(targets), first_non_special_target, @@ -148,6 +150,7 @@ impl<'a> Makefile<'a> { let inference_rule_candidates = self .inference_rules .iter() + .chain(self.builtin_inference_rules.iter()) .filter(|rule| rule.matches(name).unwrap_or(false)); for rule in inference_rule_candidates { // whose prerequisite file ($*.s2) exists. -- cgit v1.2.3