1. 程式人生 > >makefile中使用環境變數的例子

makefile中使用環境變數的例子

上例子

首先,在linux 環境中,如此設定:

#test=1234567

#export test

#echo $test

1234567

#

然後編輯 Makefile

all:
    @echo $(test)

執行結果: 

#make

   1234567

#

結束