From 7f3f397015e0b417ef6a35fec819ec1d3761d5b8 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Tue, 6 Apr 2021 16:32:45 -0600 Subject: clean up suffix rule ignoring info --- src/makefile/input.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/makefile/input.rs b/src/makefile/input.rs index 7651306..ecf195a 100644 --- a/src/makefile/input.rs +++ b/src/makefile/input.rs @@ -503,8 +503,7 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> { // don't interpret things like `.tmp: ; mkdir -p $@` as single-suffix rules let inference_match = inference_match.and_then(|inference| { - if (inference.s1.is_empty() - || self.special_target_has_prereq(".SUFFIXES", inference.s1)) + if self.special_target_has_prereq(".SUFFIXES", inference.s1) && (inference.s2.is_empty() || self.special_target_has_prereq(".SUFFIXES", inference.s2)) { @@ -513,7 +512,7 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> { log::info!( "looks like {:?} is not a suffix rule because .SUFFIXES is {:?}", inference, - self.targets.get(".SUFFIXES") + self.targets.get(".SUFFIXES").map(|x| &x.prerequisites) ); None } -- cgit v1.2.3