From 4896ae35773d45735ee98d46d7dd905d68800405 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 15 Apr 2021 23:37:13 -0600 Subject: don't strip comments in multiline macro definitions --- src/makefile/input.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/makefile/input.rs b/src/makefile/input.rs index 64b12d7..c2f8e7b 100644 --- a/src/makefile/input.rs +++ b/src/makefile/input.rs @@ -802,7 +802,11 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> { } let mut value = TokenString::empty(); // TODO what should be done with escaped newlines - while let Some((_, line)) = self.next_line(Default::default()) { + let settings = NextLineSettings { + strip_comments: false, // apparently + ..Default::default() + }; + while let Some((_, line)) = self.next_line(settings) { let line = line?; if line == "endef" { break; -- cgit v1.2.3