From 1215c6e7615897e4a0bfd6867b762a47fc34f37f Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Wed, 7 Oct 2009 02:40:58 +0200 Subject: Move generation of config-host.h to Makefile from configure Use timestamp based appreach to avoid not needed recompilation. Add it to rules.mak Many thanks to Paolo Bonzini for helpding the design, and the debug. Patchworks-ID: 35190 Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c5527398d8..144b392ca7 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,10 @@ else DOCS= endif -build-all: $(TOOLS) $(DOCS) recurse-all +SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) + +build-all: config-host.h + $(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,) config-host.mak: configure ifneq ($(wildcard config-host.mak),) @@ -37,10 +40,12 @@ ifneq ($(wildcard config-host.mak),) @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh endif -SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) +config-host.h: config-host.h-timestamp +config-host.h-timestamp: config-host.mak + SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) -subdir-%: +subdir-%: config-host.h $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,) $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a @@ -200,7 +205,7 @@ clean: done distclean: clean - rm -f config-host.mak config-host.h config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi + rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr} for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \ rm -rf $$d || exit 1 ; \ -- cgit v1.2.3