aboutsummaryrefslogtreecommitdiff
path: root/yapymake/makefile/__init__.py
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-25 18:14:22 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-25 18:14:22 -0600
commit1f534fbf0c0571feb5d8675e428536436fc58060 (patch)
tree5c9499c2b5ce8794b4fba8de009db55cf60ef979 /yapymake/makefile/__init__.py
parent9fc0c83d6892ae90500c302c656657b2c17ab19f (diff)
downloadyapymake-1f534fbf0c0571feb5d8675e428536436fc58060.tar.gz
yapymake-1f534fbf0c0571feb5d8675e428536436fc58060.zip
update the targets requested
Diffstat (limited to 'yapymake/makefile/__init__.py')
-rw-r--r--yapymake/makefile/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yapymake/makefile/__init__.py b/yapymake/makefile/__init__.py
index 1d262e8..7a2adfe 100644
--- a/yapymake/makefile/__init__.py
+++ b/yapymake/makefile/__init__.py
@@ -20,12 +20,14 @@ class Makefile:
_inference_rules: List['InferenceRule']
_macros: Dict[str, Tuple['MacroSource', TokenString]]
_targets: Dict[str, 'Target']
+ first_non_special_target: Optional[str]
args: Args
def __init__(self, args: Args):
self._inference_rules = []
self._macros = dict()
self._targets = dict()
+ self.first_non_special_target = None
self.args = args
if args.builtin_rules:
@@ -123,6 +125,8 @@ class Makefile:
else:
# it's a target rule!
for target in targets:
+ if self.first_non_special_target is None:
+ self.first_non_special_target = target
# > A target that has prerequisites, but does not have any commands, can be used to add to the
# > prerequisite list for that target.
# but also