make函数之shell
$(shell command arguments)
名称: 执行 shell 命令函数
功能: 在新的 shell 中执行 CMD 命令
返回值: CMD 在 shell 中执行的结果
例如:PLATFORM=$(shell $(ROOT)/systype.sh)在执行完下面的脚本后等价于PLATFORM=linux
case `uname -s` in
"FreeBSD")
PLATFORM="freebsd"
;;
"Linux")
PLATFORM="linux"
;;
"Darwin")
PLATFORM="macos"
;;
"SunOS")
PLATFORM="solaris"
;;
*)
echo "Unknown platform" >&2
exit 1
esac
echo $PLATFORM
exit 0


浙公网安备 33010602011771号