aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-02 20:12:25 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-02 20:12:25 -0600
commit9e714b326f0d30b4154c3120a92d6807beaadfca (patch)
tree9055fee0bb1fc73b510a9d34421d98fce65c1c34
parent1b3e677507c17388bc2ae85ad5a6c03a9dff139b (diff)
downloadmakers-9e714b326f0d30b4154c3120a92d6807beaadfca.tar.gz
makers-9e714b326f0d30b4154c3120a92d6807beaadfca.zip
add context for dependency resolution
-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)?;