From 957721e40a8bed5907319da6b2b9053c3c079527 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 25 Mar 2021 19:29:31 -0600 Subject: keep trailing newlines from polluting macros --- yapymake/makefile/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yapymake/makefile/__init__.py b/yapymake/makefile/__init__.py index a5cb19d..be04a5b 100644 --- a/yapymake/makefile/__init__.py +++ b/yapymake/makefile/__init__.py @@ -101,6 +101,9 @@ class Makefile: # make sure we don't process an ambiguous line as both an include and something else continue + # TODO figure out if this is always safe here + line = line.rstrip('\n') + # decide if this is a macro or rule line_type = 'unknown' line_tokens = tokenize(line) -- cgit v1.2.3