diff options
author | Melody Horn <melody@boringcactus.com> | 2021-03-28 16:15:42 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-03-28 16:15:42 -0600 |
commit | 57e4222900de52da5ffe13933fbebe91fbd7bab9 (patch) | |
tree | 0130a8b5aa46a2aea78fe2cec46088749e066bef /src/makefile/mod.rs | |
parent | bc5038e6c344803bce76add47b13ceaa61a5bde3 (diff) | |
download | makers-57e4222900de52da5ffe13933fbebe91fbd7bab9.tar.gz makers-57e4222900de52da5ffe13933fbebe91fbd7bab9.zip |
almost finish implementing functions
Diffstat (limited to 'src/makefile/mod.rs')
-rw-r--r-- | src/makefile/mod.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs index 7610197..f3b7efa 100644 --- a/src/makefile/mod.rs +++ b/src/makefile/mod.rs @@ -23,7 +23,7 @@ mod token; use command_line::CommandLine; use conditional::{ConditionalLine, ConditionalState}; use inference_rules::InferenceRule; -use r#macro::{LookupInternal, MacroSet, MacroSource}; +use r#macro::{MacroSet, MacroSetLike, MacroSource}; use target::Target; use token::{tokenize, Token, TokenString}; @@ -506,7 +506,7 @@ impl<'a> Makefile<'a> { .filter(|prereq| { self.get_target(prereq) .borrow() - .newer_than(&target) + .newer_than(target) .unwrap_or(false) }) .cloned() @@ -554,9 +554,7 @@ impl<'a> Makefile<'a> { macro_pieces.join(" ") }; - let lookup_internal: Rc<dyn LookupInternal> = Rc::new(lookup_internal); - self.macros.lookup(Rc::downgrade(&lookup_internal)); - self.macros.expand(text) + self.macros.with_lookup(&lookup_internal).expand(text) } } |