diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-03 13:42:49 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-03 13:42:49 -0600 |
commit | 94049a42a0f61ab9f3ec7a0ea109a2e0ac9edfcc (patch) | |
tree | e1252c7ba2b863fec75469de25b898199c19cc23 /src/makefile/mod.rs | |
parent | 101c96b03ecf180af986bc20b7161b0933ae47cf (diff) | |
download | makers-94049a42a0f61ab9f3ec7a0ea109a2e0ac9edfcc.tar.gz makers-94049a42a0f61ab9f3ec7a0ea109a2e0ac9edfcc.zip |
correctly inherit macros
Diffstat (limited to 'src/makefile/mod.rs')
-rw-r--r-- | src/makefile/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs index 88a3abb..3d824b9 100644 --- a/src/makefile/mod.rs +++ b/src/makefile/mod.rs @@ -24,6 +24,7 @@ mod token; use command_line::CommandLine; use inference_rules::InferenceRule; +use input::FinishedMakefileReader; pub use input::MakefileReader; use r#macro::{Set as MacroSet, Source as MacroSource}; use target::Target; @@ -31,7 +32,7 @@ use token::TokenString; pub struct Makefile<'a> { inference_rules: Vec<InferenceRule>, - macros: MacroSet<'static, 'static>, + pub macros: MacroSet<'static, 'static>, targets: RefCell<HashMap<String, Rc<RefCell<Target>>>>, pub first_non_special_target: Option<String>, args: &'a Args, @@ -76,7 +77,7 @@ impl<'a> Makefile<'a> { } } - pub fn extend<R: std::io::BufRead>(&mut self, new: MakefileReader<R>) { + pub fn extend(&mut self, new: FinishedMakefileReader) { self.inference_rules.extend(new.inference_rules); self.macros.extend(new.macros); self.targets.borrow_mut().extend( |