aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile/input.rs')
-rw-r--r--src/makefile/input.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/makefile/input.rs b/src/makefile/input.rs
index 5afecc6..b828829 100644
--- a/src/makefile/input.rs
+++ b/src/makefile/input.rs
@@ -182,6 +182,22 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> {
#[cfg(feature = "full")]
conditional_stack: Vec::new(),
};
+ // TODO be smart about this instead
+ if !args.no_builtin_rules {
+ reader.targets.insert(
+ ".SUFFIXES".to_owned(),
+ Target {
+ name: ".SUFFIXES".into(),
+ prerequisites: vec![".o", ".c", ".y", ".l", ".a", ".sh", ".f"]
+ .into_iter()
+ .map(String::from)
+ .collect(),
+ commands: vec![],
+ stem: None,
+ already_updated: Cell::new(false),
+ },
+ );
+ }
reader.read_all()?;
Ok(reader)
}
@@ -434,6 +450,11 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> {
{
Some(inference)
} else {
+ log::info!(
+ "looks like {:?} is not a suffix rule because .SUFFIXES is {:?}",
+ inference,
+ self.targets.get(".SUFFIXES")
+ );
None
}
});