aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/mod.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-02 20:11:50 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-02 20:11:50 -0600
commitaa017eb4dc9f070c35711fdf908171938921c422 (patch)
tree2ef87ddf72702d1adbdcc2038c762036aada43ab /src/makefile/mod.rs
parent104919da765b1b85aca3246ecdb1a16b71ee6245 (diff)
downloadmakers-aa017eb4dc9f070c35711fdf908171938921c422.tar.gz
makers-aa017eb4dc9f070c35711fdf908171938921c422.zip
ignore macro-expanded-to-empty lines
Diffstat (limited to 'src/makefile/mod.rs')
-rw-r--r--src/makefile/mod.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs
index dfedd97..82d7d39 100644
--- a/src/makefile/mod.rs
+++ b/src/makefile/mod.rs
@@ -244,11 +244,13 @@ impl<'a> Makefile<'a> {
LineType::Rule => self.read_rule(&line_tokens, line_number, &mut lines_iter)?,
LineType::Macro => self.read_macro(&line_tokens, line_number)?,
LineType::Unknown => {
- bail!(
- "error: line {}: unknown line \"{}\"",
- line_number,
- line_tokens
- );
+ if !line_tokens.is_empty() {
+ bail!(
+ "error: line {}: unknown line \"{}\"",
+ line_number,
+ line_tokens
+ );
+ }
}
}
}