diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-05 12:08:46 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-05 12:08:46 -0600 |
commit | 0539e82bab014b24b956752cc4301b1cba8edc0f (patch) | |
tree | cf9bb8af51eb0736ab121d506535ec2979ed82c9 /src | |
parent | 6a41b2ac4a2d171917126e56b741b16a184897c7 (diff) | |
download | makers-0539e82bab014b24b956752cc4301b1cba8edc0f.tar.gz makers-0539e82bab014b24b956752cc4301b1cba8edc0f.zip |
warn when expanding undefined macro
Diffstat (limited to 'src')
-rw-r--r-- | src/makefile/macro.rs | 5 |
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), )? }; |