From 9e714b326f0d30b4154c3120a92d6807beaadfca Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Fri, 2 Apr 2021 20:12:25 -0600 Subject: add context for dependency resolution --- src/makefile/target.rs | 5 +++-- 1 file 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)?; -- cgit v1.2.3