aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-02 20:53:16 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-02 20:53:16 -0600
commit68ebea2da2b178f740f4e0682ff1a8857adaaa3b (patch)
treec5b9aa6d03dc7e624d3baa67379c98b41076af13
parent0d704e6a3db091f6ab38b4f535491e73cb0a9ce4 (diff)
downloadmakers-68ebea2da2b178f740f4e0682ff1a8857adaaa3b.tar.gz
makers-68ebea2da2b178f740f4e0682ff1a8857adaaa3b.zip
don't skip over endif while waiting for endif oops
-rw-r--r--src/makefile/mod.rs21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs
index 75805f6..5f4ca15 100644
--- a/src/makefile/mod.rs
+++ b/src/makefile/mod.rs
@@ -188,6 +188,17 @@ impl<'a> Makefile<'a> {
}
let line = COMMENT.replace(&line, "").into_owned();
+ #[cfg(feature = "full")]
+ if let Some(line) = ConditionalLine::from(&line, |t| self.expand_macros(t, None))? {
+ line.action(
+ conditional_stack.last(),
+ |name| self.macros.is_defined(name),
+ |t| self.expand_macros(t, None),
+ )?
+ .apply_to(&mut conditional_stack);
+ continue;
+ }
+
// skip lines if we need to
#[cfg(feature = "full")]
if conditional_stack
@@ -211,16 +222,6 @@ impl<'a> Makefile<'a> {
continue;
}
- #[cfg(feature = "full")]
- if let Some(line) = ConditionalLine::from(&line, |t| self.expand_macros(t, None))? {
- line.action(
- conditional_stack.last(),
- |name| self.macros.is_defined(name),
- |t| self.expand_macros(t, None),
- )?
- .apply_to(&mut conditional_stack);
- continue;
- }
if line.trim().is_empty() {
// handle blank lines
continue;