summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 15 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index ef585d094..c69662eb9 100644
--- a/Makefile
+++ b/Makefile
@@ -11,8 +11,13 @@ config-host.mak:
@exit 1
endif
+# Don't try to regenerate Makefile or configure
+# We don't generate any of them
+Makefile: ;
+configure: ;
+
.PHONY: all clean cscope distclean dvi html info install install-doc \
- recurse-all speed tar tarbin test
+ recurse-all speed tar tarbin test build-all
VPATH=$(SRC_PATH):$(SRC_PATH)/hw
@@ -24,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),)
@@ -32,7 +40,9 @@ 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))
ifeq ($(KVM_KMOD),yes)
@@ -47,7 +57,7 @@ kvm-kmod:
endif
-subdir-%:
+subdir-%: config-host.h
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
@@ -208,7 +218,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 ; \