aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/target.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-04 12:01:03 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-04 12:01:03 -0600
commit68db8d315e3ef67c608cb2eddca16fd5e5fddccb (patch)
tree93173d0093cc51b3387297dd178068918cc1c569 /src/makefile/target.rs
parent6a8a04c0762e9d0c1ee357973486015a2522672d (diff)
downloadmakers-68db8d315e3ef67c608cb2eddca16fd5e5fddccb.tar.gz
makers-68db8d315e3ef67c608cb2eddca16fd5e5fddccb.zip
logging!
Diffstat (limited to 'src/makefile/target.rs')
-rw-r--r--src/makefile/target.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/makefile/target.rs b/src/makefile/target.rs
index ad46884..1c382d0 100644
--- a/src/makefile/target.rs
+++ b/src/makefile/target.rs
@@ -53,6 +53,12 @@ impl Target {
.and_then(|t| self.newer_than(&t.borrow()))
.unwrap_or(false)
});
+ log::trace!(
+ "{:>50} exists: {}, newer than dependencies: {}",
+ self.name,
+ exists,
+ newer_than_all_dependencies
+ );
exists && newer_than_all_dependencies
}
@@ -62,6 +68,10 @@ impl Target {
.wrap_err_with(|| format!("as a dependency for target {}", self.name))?;
}
if !self.is_up_to_date(file) {
+ log::debug!("rebuilding {}...", self.name);
+ if self.commands.is_empty() {
+ log::warn!("no commands found to rebuild {}", self.name);
+ }
self.execute_commands(file)
.wrap_err_with(|| format!("while updating target {}", self.name))?;
}
@@ -72,6 +82,7 @@ impl Target {
fn execute_commands(&self, file: &Makefile) -> Result<()> {
for command in &self.commands {
+ log::trace!(" executing {}", command);
command.execute(file, self)?;
}