diff options
author | Juan Quintela | 2009-10-07 02:40:58 +0200 |
---|---|---|
committer | Anthony Liguori | 2009-10-09 04:17:03 +0200 |
commit | 1215c6e7615897e4a0bfd6867b762a47fc34f37f (patch) | |
tree | d1a89ac56768083704a24a6f03ec8de1534cf2a3 /Makefile | |
parent | Don't include config-host.mak from inside config.mak (diff) | |
download | qemu-1215c6e7615897e4a0bfd6867b762a47fc34f37f.tar.gz qemu-1215c6e7615897e4a0bfd6867b762a47fc34f37f.tar.xz qemu-1215c6e7615897e4a0bfd6867b762a47fc34f37f.zip |
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-- | Makefile | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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 ; \ |