继续翻译
2.6 Another Style of Makefile ============================= When the objects of a makefile are created only by implicit rules, an alternative style of makefile is possible. In this style of makefile,you group entries by their prerequisites instead of by their targets. Here is what one looks like: objects = main.o kbd.o command.o display.o \ insert.o search.o files.o utils.o edit : $(objects) cc -o edit $(objects) $(objects) : defs.h kbd.o command.o files.o : command.h display.o insert.o search.o files.o : buffer.h
2.6 另一种类型的 makefile
如果一个makefile的目标文件仅仅是由隐式规则所创建,那么另一种类型的makefile 是可能的。
在这种类型的makefile中,你可以把它们按照前提条件来分组,而不是按他们的目的来分组。
下面是它可能的样子:
objects = main.o kbd.o command.o display.o \
insert.o search.o files.o utils.o edit : $(objects) cc -o edit $(objects) $(objects) : defs.h kbd.o command.o files.o : command.h display.o insert.o search.o files.o : buffer.h后文待续