From dfbeba22a437bb2134f696f0d266dbf734944012 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 25 Mar 2021 22:17:59 -0600 Subject: skip rule if there are no targets --- yapymake/makefile/__init__.py | 3 +++ 1 file changed, 3 insertions(+) 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(\.[^/.]+)?)(?P\.[^/.]+)', targets[0]) # we don't want to catch special targets, though -- cgit v1.2.3