pax*_*blo 10
您应该能够检查其中一个uname变体的输出,然后makefile根据具体情况选择不同的操作.
运行man uname详细信息.
关于如何从GNU make中使用它,您可以将信息从shell函数中获取到变量中,然后ifeq在该变量上使用:
platform=$(shell uname -o)
ifeq ($(platform),Cygwin)
defrule:
echo I am running in Cygwin.
else
defrule:
echo I am running elsewhere.
endif
Run Code Online (Sandbox Code Playgroud)