假設我在Makefile
中有以下規則。Makefile |頭文件中包含的另一個頭文件的依賴關係
test.o: test.cpp foo.h
g++ -c -o test.o test.cpp
現在假設foo.h
包括bar.h
,如下所示。
user $ head -n 5 foo.h
#include"bar.h"
/*
.
.
*/
user $
請問test.o
重新建造是否有bar.h
什麼變化?
或者我應該特別提到在規則如下bar.h
:
test.o: test.cpp foo.h bar.h
g++ -c -o test.o test.cpp