From 9bf25a9c082a9df7255cd23086bc3e3eb1cec9c3 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Thu, 6 Nov 2008 13:59:14 +0000 Subject: [PATCH] Every time we run make in a v3 tree, lar, lzma, nrv2b and the option table get rebuilt unconditionally due to slightly incorrect dependencies. That's wasteful and may hide other dependency bugs. Fix the lar, lzma, nrv2b and option table dependencies. This trims down recompilation time a lot. The only remaining stuff being rebuilt is: ~/corebootv3-better_dependencies> make CP build/config.h GEN build/build.h LAR build/coreboot.rom PAYLOAD none (as specified by user) CP build/bios.bin DONE Signed-off-by: Carl-Daniel Hailfinger Acked-by: Myles Watson Acked-by: Stefan Reinauer git-svn-id: svn://coreboot.org/repository/coreboot-v3@984 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- util/lar/Makefile | 9 +++++---- util/lzma/Makefile | 4 ++-- util/nrv2b/Makefile | 6 +++--- util/options/Makefile | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/util/lar/Makefile b/util/lar/Makefile index 6aef6e4561..d8bad25911 100644 --- a/util/lar/Makefile +++ b/util/lar/Makefile @@ -19,16 +19,17 @@ ## LAROBJ := lar.o stream.o lib.o -LARDIR := lardir +LARDIR := $(obj)/util/lar/ COMPRESSOR := $(LZMA_OBJ) $(obj)/util/lzma/lzma-compress.o -LARDIR += lzmadir +LARDIR += $(obj)/util/lzma/ COMPRESSOR += $(obj)/util/nrv2b/nrv2b-compress.o -LARDIR += nrv2bdir +LARDIR += $(obj)/util/nrv2b/ LAROBJ_ABS := $(patsubst %,$(obj)/util/lar/%,$(LAROBJ)) -lardir: + +$(obj)/util/lar/: $(Q)printf " BUILD LAR\n" $(Q)mkdir -p $(obj)/util/lar diff --git a/util/lzma/Makefile b/util/lzma/Makefile index 960bfe01ff..0adb341ee9 100644 --- a/util/lzma/Makefile +++ b/util/lzma/Makefile @@ -23,13 +23,13 @@ LZMA_OBJ += $(obj)/util/lzma/RangeCoderBit.o $(obj)/util/lzma/StreamUtils.o LZMA_OBJ += $(obj)/util/lzma/OutBuffer.o $(obj)/util/lzma/Alloc.o LZMA_OBJ += $(obj)/util/lzma/CRC.o -$(obj)/util/lzma/lzma: lzmadir $(LZMA_OBJ) $(obj)/util/lzma/minilzma.o +$(obj)/util/lzma/lzma: $(obj)/util/lzma/ $(LZMA_OBJ) $(obj)/util/lzma/minilzma.o $(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ $(LZMA_OBJ) $(obj)/util/lzma/minilzma.o $(obj)/util/lzma/lzma-compress.o: $(src)/util/lzma/minilzma.cc $(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c -DCOMPACT $< -lzmadir: +$(obj)/util/lzma/: $(Q)printf " BUILD LZMA\n" $(Q)mkdir -p $(obj)/util/lzma/ diff --git a/util/nrv2b/Makefile b/util/nrv2b/Makefile index 5a35ddf267..121aedb763 100644 --- a/util/nrv2b/Makefile +++ b/util/nrv2b/Makefile @@ -19,15 +19,15 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -$(obj)/util/nrv2b/nrv2b: nrv2bdir $(src)/util/nrv2b/nrv2b.c +$(obj)/util/nrv2b/nrv2b: $(obj)/util/nrv2b/ $(src)/util/nrv2b/nrv2b.c $(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(HOSTCC) $(HOSTCFLAGS) -DENCODE -DDECODE -DMAIN -DVERBOSE -DNDEBUG -DBITSIZE=32 -DENDIAN=0 -o $@ $(src)/util/nrv2b/nrv2b.c -$(obj)/util/nrv2b/nrv2b-compress.o: nrv2bdir $(src)/util/nrv2b/nrv2b.c +$(obj)/util/nrv2b/nrv2b-compress.o: $(obj)/util/nrv2b/ $(src)/util/nrv2b/nrv2b.c $(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(HOSTCC) $(HOSTCFLAGS) -DENCODE -DDECODE -DVERBOSE -DCOMPACT -DNDEBUG -DBITSIZE=32 -DENDIAN=0 -c -o $@ $(src)/util/nrv2b/nrv2b.c -nrv2bdir: +$(obj)/util/nrv2b/: $(Q)printf " BUILD NRV2B\n" $(Q)mkdir -p $(obj)/util/nrv2b/ diff --git a/util/options/Makefile b/util/options/Makefile index c5d8b4be12..2c97bf39ad 100644 --- a/util/options/Makefile +++ b/util/options/Makefile @@ -21,11 +21,11 @@ OPTIONS_OBJ := $(obj)/util/options/build_opt_tbl.o -$(obj)/util/options/build_opt_tbl: optionsdir $(OPTIONS_OBJ) +$(obj)/util/options/build_opt_tbl: $(obj)/util/options/ $(OPTIONS_OBJ) $(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(HOSTCC) $(HOSTCFLAGS) -o $@ $(OPTIONS_OBJ) -optionsdir: +$(obj)/util/options/: $(Q)mkdir -p $(obj)/util/options/ $(obj)/util/options/%.o: $(src)/util/options/%.c