我需要使用grep查找文本'ifeq ($(Param1)'。我尝试将搜索结果分配给make变量,但问题在于单引号不能转义make中的文本,因此当我尝试执行以下操作时:
GrepResult:= $(shell grep 'ifeq ($$(Param1)' TextFile)
I get:
Makefile:214: *** unterminated call to function `shell': missing `)'. Stop.
$可以用$$转义,但我如何在makefile中转义括号?谢谢。
注意:$GrepResult 在$(error)函数中使用,而不是在规则命令中使用。
$(shell grep ...)
?就将grep、awk、sort、pr分别使用小写字母? - tarabyte