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, 3 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 116b349..668d2e2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -58,17 +58,15 @@ fn main() -> Result<()> {
// TODO dump command-line args into MAKEFLAGS
// TODO dump command-line macros into environment
// TODO add SHELL macro
- let mut makefile_reader = MakefileReader::new(&args);
+ let mut makefile = Makefile::new(&args);
for filename in &args.makefile {
if filename == &PathBuf::from("-") {
- makefile_reader.and_read(stdin().lock())?;
+ makefile.extend(MakefileReader::read(&args, stdin().lock())?);
} else {
- makefile_reader.and_read_file(filename)?;
+ makefile.extend(MakefileReader::read_file(&args, filename)?);
};
}
- let makefile: Makefile = makefile_reader.into();
-
if args.print_everything {
println!("{}", &makefile);
}