diff --git a/Makefile b/Makefile index b31a3b784..a686c1096 100644 --- a/Makefile +++ b/Makefile @@ -561,9 +561,9 @@ test_%: check-target-independence: $(V1) for test_target in $(VALID_TARGETS); do \ - FOUND=$$(grep -rE "\W$${test_target}\W?" src/main | grep -vE "(//)|(/\*).*\W$${test_target}\W?" | grep -vE "^src/main/target"); \ + FOUND=$$(grep -rE "\W$${test_target}(\W.*)?$$" src/main | grep -vE "(//)|(/\*).*\W$${test_target}(\W.*)?$$" | grep -vE "^src/main/target"); \ if [ "$${FOUND}" != "" ]; then \ - echo "Target dependencies found:"; \ + echo "Target dependencies for target '$${test_target}' found:"; \ echo "$${FOUND}"; \ exit 1; \ fi; \