From 5df8be8e7a65d1eb5cb2d93f90aff25421a336b3 Mon Sep 17 00:00:00 2001 From: Arun Thomas Date: Tue, 19 Jul 2011 15:26:25 +0200 Subject: [PATCH] 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 --- Makefile | 21 ++++++++++----------- drivers/memory/Makefile | 5 ----- drivers/ramdisk/Makefile | 2 +- lib/Makefile | 4 ++-- 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index cc8f36aaf..c552450c7 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile index 4357ec74c..bf853cee7 100644 --- a/drivers/memory/Makefile +++ b/drivers/memory/Makefile @@ -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 diff --git a/drivers/ramdisk/Makefile b/drivers/ramdisk/Makefile index cab36c948..9e044cdc1 100644 --- a/drivers/ramdisk/Makefile +++ b/drivers/ramdisk/Makefile @@ -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 diff --git a/lib/Makefile b/lib/Makefile index 434d2d450..6f3832608 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -35,10 +35,10 @@ SUBDIR+= libend .include 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 -- 2.44.0