buildsystem: use dependall target

Improves cache locality by grouping together dependency generation
with building for each program instead of doing a whole-tree dep
generation phase followed by a whole-tree build phase
This commit is contained in:
Arun Thomas 2011-07-19 15:26:25 +02:00
parent b1408f61b4
commit 5df8be8e7a
4 changed files with 13 additions and 19 deletions

View file

@ -16,7 +16,6 @@ usage:
@echo " make elf-libraries # Compile and install gcc/clang elf libs" @echo " make elf-libraries # Compile and install gcc/clang elf libs"
@echo " make commands # Compile all, commands, but don't install" @echo " make commands # Compile all, commands, but don't install"
@echo " make install # Compile and install commands" @echo " make install # Compile and install commands"
@echo " make depend # Generate required .depend files"
@echo " make gnu-includes # Install include files for GCC" @echo " make gnu-includes # Install include files for GCC"
@echo " make clean # Remove all compiler results" @echo " make clean # Remove all compiler results"
@echo "" @echo ""
@ -31,7 +30,7 @@ usage:
# 'make install' target. # 'make install' target.
# #
# etcfiles has to be done first. # etcfiles has to be done first.
world: mkfiles includes depend libraries elf-libraries install etcforce world: mkfiles includes libraries elf-libraries dep-all install etcforce
mkfiles: mkfiles:
make -C share/mk install make -C share/mk install
@ -57,14 +56,14 @@ commands: includes libraries
$(MAKE) -C bin all $(MAKE) -C bin all
$(MAKE) -C usr.bin all $(MAKE) -C usr.bin all
depend: dep-all:
$(MAKE) CC=cc -C boot depend $(MAKE) CC=cc -C boot dependall
$(MAKE) -C commands depend $(MAKE) -C commands dependall
$(MAKE) -C bin depend $(MAKE) -C bin dependall
$(MAKE) -C usr.bin depend $(MAKE) -C usr.bin dependall
$(MAKE) -C kernel depend $(MAKE) -C kernel dependall
$(MAKE) -C servers depend $(MAKE) -C servers dependall
$(MAKE) -C drivers depend $(MAKE) -C drivers dependall
etcfiles: etcfiles:
$(MAKE) -C etc install $(MAKE) -C etc install
@ -84,8 +83,8 @@ install:
$(MAKE) -C man install makedb $(MAKE) -C man install makedb
$(MAKE) -C commands install $(MAKE) -C commands install
$(MAKE) -C bin install $(MAKE) -C bin install
$(MAKE) -C servers install
$(MAKE) -C usr.bin install $(MAKE) -C usr.bin install
$(MAKE) -C servers install
$(MAKE) -C share install $(MAKE) -C share install
$(MAKE) -C tools install $(MAKE) -C tools install

View file

@ -13,9 +13,4 @@ INSTALLFLAGS+= -S 8k
CPPFLAGS.memory.c+= -I${MINIXSRCDIR} CPPFLAGS.memory.c+= -I${MINIXSRCDIR}
CPPFLAGS.imgrd.c+= -I${.CURDIR}/../ramdisk -T /usr/tmp CPPFLAGS.imgrd.c+= -I${.CURDIR}/../ramdisk -T /usr/tmp
imgrd.d: touch-genfiles
touch-genfiles:
[ -e ${.CURDIR}/../ramdisk/image.c ] || touch -t 197001010000.00 ${.CURDIR}/../ramdisk/image.c
.include <minix.bootprog.mk> .include <minix.bootprog.mk>

View file

@ -23,7 +23,7 @@ CLEANFILES += $(PROGRAMS) $(SCRIPTS) $(EXTRA) bintoc image image.c t proto.gen
install: all install: all
all: image.c realall: image.c
image.c: bintoc image image.c: bintoc image
./bintoc -o $@ image ./bintoc -o $@ image