diff options
author | Melody Horn <melody@boringcactus.com> | 2024-11-11 17:15:08 -0700 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2024-11-11 17:15:08 -0700 |
commit | 4f9299b4639802e05e1cb27d8eb40305ff8e110e (patch) | |
tree | 0da5529c68c82e97aed67d842e50f6285e79e6c2 /src/makefile/target.rs | |
parent | fbbcf325b8bbe72f924da6a7cdb128d973ef0026 (diff) | |
download | makers-4f9299b4639802e05e1cb27d8eb40305ff8e110e.tar.gz makers-4f9299b4639802e05e1cb27d8eb40305ff8e110e.zip |
implement rule-specific macros for targets
Diffstat (limited to 'src/makefile/target.rs')
-rw-r--r-- | src/makefile/target.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/makefile/target.rs b/src/makefile/target.rs index d6fac2c..e106c54 100644 --- a/src/makefile/target.rs +++ b/src/makefile/target.rs @@ -8,9 +8,7 @@ use std::time::SystemTime; use eyre::{Result, WrapErr}; -use crate::makefile::command_line::CommandLine; - -use super::Makefile; +use super::{CommandLine, MacroSet, Makefile}; #[derive(PartialEq, Eq, Clone, Debug)] pub struct Target { @@ -19,6 +17,7 @@ pub struct Target { pub commands: Vec<CommandLine>, pub stem: Option<String>, pub already_updated: Cell<bool>, + pub macros: MacroSet, } impl Target { @@ -43,6 +42,7 @@ impl Target { self.stem = self.stem.take().or(other.stem); let already_updated = self.already_updated.get() || other.already_updated.get(); self.already_updated.set(already_updated); + self.macros.extend(other.macros); } } } |