顯示具有 make 標籤的文章。 顯示所有文章
顯示具有 make 標籤的文章。 顯示所有文章

2014年8月11日 星期一

Makefile 變數指定


// 若指定值使用其他變數,此變數會連帶更動
VARIABLE = value

// 若指定值使用其他變數,此變數不會連帶更動

VARIABLE := value  

// 若變數未設定值時才給值
VARIABLE ?= value 
 
// 增加字串到原有變數
VARIABLE += value




References :
gnu make - Makefile variable assignment - Stack Overflow

2014年6月3日 星期二

make: `test' is up to date.

To force rebuild on these kind of not-file-related targets, you should make them phony as follows:
$ vi Makefile
.PHONY: all test clean




References :
makefile - Why does make think the target is up to date? - Stack Overflow