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 commands # Compile all, commands, but don't install"
@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 clean # Remove all compiler results"
@echo ""
@ -31,7 +30,7 @@ usage:
# 'make install' target.
#
# 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:
make -C share/mk install
@ -57,14 +56,14 @@ commands: includes libraries
$(MAKE) -C bin all
$(MAKE) -C usr.bin all
depend:
$(MAKE) CC=cc -C boot depend
$(MAKE) -C commands depend
$(MAKE) -C bin depend
$(MAKE) -C usr.bin depend
$(MAKE) -C kernel depend
$(MAKE) -C servers depend
$(MAKE) -C drivers depend
dep-all:
$(MAKE) CC=cc -C boot dependall
$(MAKE) -C commands dependall
$(MAKE) -C bin dependall
$(MAKE) -C usr.bin dependall
$(MAKE) -C kernel dependall
$(MAKE) -C servers dependall
$(MAKE) -C drivers dependall
etcfiles:
$(MAKE) -C etc install
@ -84,8 +83,8 @@ install:
$(MAKE) -C man install makedb
$(MAKE) -C commands install
$(MAKE) -C bin install
$(MAKE) -C servers install
$(MAKE) -C usr.bin install
$(MAKE) -C servers install
$(MAKE) -C share install
$(MAKE) -C tools install

View file

@ -13,9 +13,4 @@ INSTALLFLAGS+= -S 8k
CPPFLAGS.memory.c+= -I${MINIXSRCDIR}
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>

View file

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

View file

@ -35,10 +35,10 @@ SUBDIR+= libend
.include <bsd.subdir.mk>
build_ack:
sh ack_build.sh obj depend all install
sh ack_build.sh obj dependall install
build_elf:
sh elf_build.sh obj depend all install
sh elf_build.sh obj dependall install
clean_all:
sh ack_build.sh clean