makefile抓系統變數 - Linux

By Charlotte
at 2012-11-02T02:01
at 2012-11-02T02:01
Table of Contents
請問
如果要在makefile裡面用shell的系統變數要怎麼寫?
我寫的是
================================================
t = ${date}
#
all: 111
echo "${t}" >> 111
================================================
結果變數t的內容是空的(從111看的)
請問要怎麼寫
進一步的說
其實我是想在code裡面儲存最後編譯的時間戳記
現在的想法是在makefile裡面抓系統時間
然後用sed來替換
請問有其他寫法嗎?
謝謝
--
如果要在makefile裡面用shell的系統變數要怎麼寫?
我寫的是
================================================
t = ${date}
#
all: 111
echo "${t}" >> 111
================================================
結果變數t的內容是空的(從111看的)
請問要怎麼寫
進一步的說
其實我是想在code裡面儲存最後編譯的時間戳記
現在的想法是在makefile裡面抓系統時間
然後用sed來替換
請問有其他寫法嗎?
謝謝
--
Tags:
Linux
All Comments

By Ina
at 2012-11-05T12:19
at 2012-11-05T12:19

By Candice
at 2012-11-09T08:53
at 2012-11-09T08:53

By Liam
at 2012-11-11T03:44
at 2012-11-11T03:44

By Candice
at 2012-11-15T21:47
at 2012-11-15T21:47

By Kristin
at 2012-11-17T06:14
at 2012-11-17T06:14
Related Posts
可以FTP登入、不能ssh登入 怎麼做?

By Rachel
at 2012-11-01T21:17
at 2012-11-01T21:17
Linux安裝軟體

By Kyle
at 2012-11-01T21:15
at 2012-11-01T21:15
SSH閒置一段後 輸入時會卡住

By Christine
at 2012-11-01T01:45
at 2012-11-01T01:45
CentOS rpm大量安裝一問

By Emily
at 2012-11-01T00:59
at 2012-11-01T00:59
如何叫醒正在 sleep 的 process

By Necoo
at 2012-10-31T23:37
at 2012-10-31T23:37