From 4f9299b4639802e05e1cb27d8eb40305ff8e110e Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Mon, 11 Nov 2024 17:15:08 -0700 Subject: implement rule-specific macros for targets --- src/makefile/target.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/makefile/target.rs') 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, pub stem: Option, pub already_updated: Cell, + 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); } } } -- cgit v1.2.3