aboutsummaryrefslogtreecommitdiff
path: root/yapymake/makefile/__init__.py
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-25 19:30:03 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-25 19:30:03 -0600
commitcd61c8e72b99006056635a219a62bfe1c523cc64 (patch)
tree0becdd85de414f8f3437192d3b733646b4315ec4 /yapymake/makefile/__init__.py
parent957721e40a8bed5907319da6b2b9053c3c079527 (diff)
downloadyapymake-cd61c8e72b99006056635a219a62bfe1c523cc64.tar.gz
yapymake-cd61c8e72b99006056635a219a62bfe1c523cc64.zip
special targets are not inference rules
Diffstat (limited to 'yapymake/makefile/__init__.py')
-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 be04a5b..c3cdddf 100644
--- a/yapymake/makefile/__init__.py
+++ b/yapymake/makefile/__init__.py
@@ -140,7 +140,9 @@ class Makefile:
# we don't know yet if it's a target rule or an inference rule
match = re.fullmatch(r'(?P<s1>(\.[^/.]+)?)(?P<s2>\.[^/.]+)', targets[0])
- if len(targets) == 1 and len(prerequisites) == 0 and match is not None:
+ # we don't want to catch special targets, though
+ special_target_match = re.fullmatch(r'\.[A-Z]+', targets[0])
+ if len(targets) == 1 and len(prerequisites) == 0 and match is not None and special_target_match is None:
# it's an inference rule!
self._inference_rules.append(InferenceRule(match.group('s1'), match.group('s2'), commands))
else: