aboutsummaryrefslogtreecommitdiff
path: root/src/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile')
-rw-r--r--src/makefile/mod.rs5
1 files changed, 4 insertions, 1 deletions
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<InferenceRule>,
+ builtin_inference_rules: Vec<InferenceRule>,
pub macros: MacroSet<'static, 'static>,
targets: RefCell<HashMap<String, Rc<RefCell<Target>>>>,
pub first_non_special_target: Option<String>,
@@ -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.