aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yapymake/makefile/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yapymake/makefile/__init__.py b/yapymake/makefile/__init__.py
index 6c7098d..006dfbe 100644
--- a/yapymake/makefile/__init__.py
+++ b/yapymake/makefile/__init__.py
@@ -159,7 +159,9 @@ class Makefile:
# > If .SUFFIXES does not have any prerequisites, the list of known suffixes shall be cleared.
if target in self._targets and len(commands) == 0 and \
not (target == '.SUFFIXES' and len(prerequisites) == 0):
- self._targets[target].prerequisites += prerequisites
+ for new_prereq in prerequisites:
+ if new_prereq not in self._targets[target].prerequisites:
+ self._targets[target].prerequisites.append(new_prereq)
else:
self._targets[target] = Target(target, prerequisites, commands)
elif line_type == 'macro':