Skip to contentSkip to conversation

[7110] Call configure automatically when needed

Qemu-devel Aurelien Jarno 1 participant 1 message Apr 15, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

Revision: 7110

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7110
Author:   aurel32
Date:     2009-04-15 14:42:57 +0000 (Wed, 15 Apr 2009)

Log Message:
-----------
Call configure automatically when needed

Automatically rerun configure when it is needed.

Modified Paths:
--------------
trunk/Makefile

Modified: trunk/Makefile
===================================================================

Makefile +12 -0
@@ -1,7 +1,13 @@
 # Makefile for QEMU.
 
+ifneq ($(wildcard config-host.mak),)
 include config-host.mak
 include $(SRC_PATH)/rules.mak
+else
+config-host.mak:
+	@echo "Please call configure before running make!"
+	@exit 1
+endif
 
 .PHONY: all clean cscope distclean dvi html info install install-doc \
 	recurse-all speed tar tarbin test
@@ -36,6 +42,12 @@
 
 all: $(TOOLS) $(DOCS) recurse-all
 
+config-host.mak: configure
+ifneq ($(wildcard config-host.mak),)
+	@echo $@ is out-of-date, running configure
+	@fgrep "Configured with:" $@ | sed s/.*Configured.with:.// | sh
+endif
+
 SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
 
 subdir-%: