aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-25 19:29:31 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-25 19:29:31 -0600
commit957721e40a8bed5907319da6b2b9053c3c079527 (patch)
tree4965e768987bf20ffc0d568c6eb39e0ccf77a32a
parentb83e916ec888b38b15a242c673c89da39b52a8e7 (diff)
downloadyapymake-957721e40a8bed5907319da6b2b9053c3c079527.tar.gz
yapymake-957721e40a8bed5907319da6b2b9053c3c079527.zip
keep trailing newlines from polluting macros
-rw-r--r--yapymake/makefile/__init__.py3
1 files changed, 3 insertions, 0 deletions
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)