From 0539e82bab014b24b956752cc4301b1cba8edc0f Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Mon, 5 Apr 2021 12:08:46 -0600 Subject: warn when expanding undefined macro --- src/makefile/macro.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/makefile') diff --git a/src/makefile/macro.rs b/src/makefile/macro.rs index 4d58e07..f62d21d 100644 --- a/src/makefile/macro.rs +++ b/src/makefile/macro.rs @@ -113,7 +113,10 @@ impl<'parent, 'lookup> Set<'parent, 'lookup> { self.lookup_internal(name)? } else { self.get(name).map_or_else( - || Ok(String::new()), + || { + log::warn!("undefined macro {}", name); + Ok(String::new()) + }, |(_, macro_value)| self.expand(macro_value), )? }; -- cgit v1.2.3