aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 668d2e2..c5240fc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -61,9 +61,13 @@ fn main() -> Result<()> {
let mut makefile = Makefile::new(&args);
for filename in &args.makefile {
if filename == &PathBuf::from("-") {
- makefile.extend(MakefileReader::read(&args, stdin().lock())?);
+ let macros = makefile.macros.with_overlay();
+ let file = MakefileReader::read(&args, macros, stdin().lock())?.finish();
+ makefile.extend(file);
} else {
- makefile.extend(MakefileReader::read_file(&args, filename)?);
+ let macros = makefile.macros.with_overlay();
+ let file = MakefileReader::read_file(&args, macros, filename)?.finish();
+ makefile.extend(file);
};
}