aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-05 12:08:46 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-05 12:08:46 -0600
commit0539e82bab014b24b956752cc4301b1cba8edc0f (patch)
treecf9bb8af51eb0736ab121d506535ec2979ed82c9
parent6a41b2ac4a2d171917126e56b741b16a184897c7 (diff)
downloadmakers-0539e82bab014b24b956752cc4301b1cba8edc0f.tar.gz
makers-0539e82bab014b24b956752cc4301b1cba8edc0f.zip
warn when expanding undefined macro
-rw-r--r--src/makefile/macro.rs5
1 files changed, 4 insertions, 1 deletions
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),
)?
};