diff options
author | Melody Horn <melody@boringcactus.com> | 2021-03-25 22:17:59 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-03-25 22:17:59 -0600 |
commit | dfbeba22a437bb2134f696f0d266dbf734944012 (patch) | |
tree | 0e977827ac0acd0e1f8fc66227f130104d1cfc9a | |
parent | b4d26560138b37cefe12105d137214a33a1672c8 (diff) | |
download | yapymake-dfbeba22a437bb2134f696f0d266dbf734944012.tar.gz yapymake-dfbeba22a437bb2134f696f0d266dbf734944012.zip |
skip rule if there are no targets
-rw-r--r-- | yapymake/makefile/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/yapymake/makefile/__init__.py b/yapymake/makefile/__init__.py index cb6fe85..609281e 100644 --- a/yapymake/makefile/__init__.py +++ b/yapymake/makefile/__init__.py @@ -161,6 +161,9 @@ class Makefile: command_token_strings.append(tokenize(next_line.lstrip('\t').rstrip('\n'))) commands = [CommandLine(c) for c in command_token_strings] + # apparently we can have no targets? if so, don't do anything + if len(targets) == 0: + continue # we don't know yet if it's a target rule or an inference rule match = re.fullmatch(r'(?P<s2>(\.[^/.]+)?)(?P<s1>\.[^/.]+)', targets[0]) # we don't want to catch special targets, though |