aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/makefile/target.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/makefile/target.rs b/src/makefile/target.rs
index 615c9e9..7c0d67c 100644
--- a/src/makefile/target.rs
+++ b/src/makefile/target.rs
@@ -3,7 +3,7 @@ use std::fmt;
use std::fs::metadata;
use std::time::SystemTime;
-use eyre::Result;
+use eyre::{Result, WrapErr};
use crate::makefile::command_line::CommandLine;
@@ -54,7 +54,8 @@ impl Target {
pub fn update(&self, file: &Makefile) -> Result<()> {
for prereq in &self.prerequisites {
- file.update_target(prereq)?;
+ file.update_target(prereq)
+ .wrap_err_with(|| format!("as a dependency for target {}", self.name))?;
}
if !self.is_up_to_date(file) {
self.execute_commands(file)?;