aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-03 20:59:44 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-03 20:59:44 -0600
commit3f696d022cfd5fe2056f287f55025b024c4a9e7b (patch)
tree4381f3c7beea178da2a697d1c986867477e1a5fd /src
parent31f7e1ccd4e378f8accb5121894bc63b61d438e6 (diff)
downloadmakers-3f696d022cfd5fe2056f287f55025b024c4a9e7b.tar.gz
makers-3f696d022cfd5fe2056f287f55025b024c4a9e7b.zip
only allow inferred prereq targets if they already existed
Diffstat (limited to 'src')
-rw-r--r--src/makefile/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs
index c81526b..ecadf72 100644
--- a/src/makefile/mod.rs
+++ b/src/makefile/mod.rs
@@ -141,6 +141,7 @@ impl<'a> Makefile<'a> {
.map_or_else(String::new, |ext| format!(".{}", ext.to_string_lossy()));
// is compared to the list of suffixes specified by the .SUFFIXES special
// targets. If the .s1 suffix is found in .SUFFIXES...
+ // TODO figure out if .SUFFIXES is supposed to apply to gnuful patterns
if self.special_target_has_prereq(".SUFFIXES", &suffix) || suffix.is_empty() {
// the inference rules shall be searched in the order defined...
// TODO implement GNUish shortest-stem-first matching
@@ -157,7 +158,8 @@ impl<'a> Makefile<'a> {
// we can't build this based on itself! fuck outta here
return None;
}
- if self.get_target(&prereq_path_name).is_ok() {
+ // TODO allow chains but only reluctantly
+ if self.targets.borrow().contains_key(&prereq_path_name) {
return Some(prereq_path_name);
}
let prereq_path = PathBuf::from(prereq_path_name);