我正在尝试做一个 make 语句来检查架构。我非常接近让它工作:
test:
ifeq ("$(shell arch)", "armv7l")
echo "This is an arm system"
else
echo "This is not an arm system."
endif
我有一个问题:虽然这似乎解决了ifeq ("i386", "armv7l")
哪个应该是错误的,但我收到以下错误:
$ make
ifeq ("i386", "armv7l")
/bin/sh: -c: line 0: syntax error near unexpected token `"i386",'
/bin/sh: -c: line 0: `ifeq ("i386", "armv7l")'
make: *** [test] Error 2
因此,它解析为两个相互比较的字符串,但存在语法错误。这里有什么问题?