我對GNU make有一個非常混亂的問題。我有以下文件:Makefile應用遞歸規則,即使它不應該
a/x.html
b/Makefile
b/c/Makefile
a/x.html
的內容是不相關的。是b/Makefile
內容如下:
SRC=../a
all: x.html
%.html: ${SRC}/%.html
rsync $< [email protected]
的b/c/Makefile
的內容是一樣的,除了爲SRC
定義:
SRC=../../a
如果我在b/c/
運行make
如預期的結果:
rsync ../../a/x.html x.html
和x.html
從複製而來3210至b/c/
。
但是,如果我在b/
運行make
輸出我得到的只是幾行:
make: stat: ../a/../a/.. (repeated many times) ../a/x.html: File name too long
似乎make
正在申請的規則%.html
遞歸的,但爲什麼呢?有什麼明顯的我失蹤?
非常感謝!我想我會使用abspath解決方案。 –