Reputation: 11
I am having an issue i have beating my head in with all morning. I am a newbie to modifying makefiles so i have come across an issue i do not know how to solve. I am trying to search through a directory for any files ending in 'Findings.txt' that has the string 'No Findings!' contained inside it. For some reason i cannot get my conditional statement to work properly. I am assuming it might have to do with the wildcard character but everything i have tried has not worked including the wilcard function. My only othera thought is the shell might have an issue with a variable in the path.
GREP_FINDINGS := $(shell grep 'No Findings' $(C_DIR)/*Findings.txt)
I want to conditionalize the output of the grep result but i am doing something wrong.
ifeq ($(GREP_FINDINGS), )
@echo "Nothing was found for current build"
else
@echo "***Found string in Findings.txt***"
endif
Upvotes: 1
Views: 10274