写了一个Makefile,如下 MEMORY=$(shell free | grep "Mem:" |awk '{print $2}') BUILD_OPTION=$(shell if [ $(MEMORY) -lt 3090252 ]; then echo "-j1"; fi)
LS=$(shell ls) hello: echo $(MEMORY) show: echo $(LS) 可是奇怪的是 第一句中, grep运行了,而 awk却没有。 输出是 echo Mem: 2060168 1949264 110904 0 16 613316 Mem: 2060168 1949264 110904 0 16 613316 或者有什么命令可以直接获取系统的内存吗? -- YunQiang Su
Makefile
Description: Binary data