aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-10-07 02:40:58 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-08 21:17:03 -0500
commit1215c6e7615897e4a0bfd6867b762a47fc34f37f (patch)
treed1a89ac56768083704a24a6f03ec8de1534cf2a3 /Makefile
parentdeed3ccfca6bbebeab4f1c6874cb9c2902956328 (diff)
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 <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
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 ; \