0
我正在試驗GNU make。假設,我有3個C文件結構如下:重新編譯未更新的文件
hellomake.c
|
|---------------------
| |
V V
hellofunc.c hellomake.h
生成文件:
hellomake: hellomake.c hellofunc.c
gcc -o hellomake hellomake.c hellofunc.c -I.
當我鍵入做出了1日的時候,它會創建一個程序hellomake
。當我運行它的第二次,它打印:
make: `hellomake' is up to date.
一切工作正常。
我試着用make來編譯LaTeX文件。假設我有2個TeX文件:
1.tex
|
V
1_data.tex
1_data內部包含在1.tex中。
的Makefile:
COMMAND = pdflatex
all: 1.tex 1_data.tex
$(COMMAND) 1.tex
但我每次鍵入make
時間重新編譯1.tex。即使沒有任何文件被修改。
怎麼了?
我明白了。我用這個:'1.pdf:1.tex 1_data.tex'代替。現在它起作用了。 – user4035 2013-04-27 20:15:34