makefile中使用环境变量的例子

来源:互联网 发布:寻仙linux服务端 编辑:程序博客网 时间:2024/06/05 11:52

上例子

首先,在linux 环境中,如此设置:

#test=1234567

#export test

#echo $test

1234567

#

然后编辑 Makefile

all:    @echo $(test)

运行结果: 

#make

   1234567

#

结束