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