From 68db8d315e3ef67c608cb2eddca16fd5e5fddccb Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 4 Apr 2021 12:01:03 -0600 Subject: logging! --- src/makefile/target.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/makefile/target.rs') 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)?; } -- cgit v1.2.3