]> git.proxmox.com Git - qemu.git/commitdiff
Generate config-devices.h
authorJuan Quintela <quintela@redhat.com>
Wed, 7 Oct 2009 00:41:03 +0000 (02:41 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 9 Oct 2009 02:17:10 +0000 (21:17 -0500)
Generate config-devices.h for each target and config-all-devices.h for
common library.  We don't want to name both config-devices.h to avoid
path problems

Patchworks-ID: 35195
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Makefile
Makefile.target
config.h

index 062c129cf8afd59bb161cacaa029953f3b788ad2..a5a17d1988ce0723934777941b2185489f1ce277 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -40,15 +40,18 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
 
 -include config-all-devices.mak
 
-build-all: config-host.h
+build-all: config-host.h config-all-devices.h
        $(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,)
 
 config-host.h: config-host.h-timestamp
 config-host.h-timestamp: config-host.mak
 
+config-all-devices.h: config-all-devices.h-timestamp
+config-all-devices.h-timestamp: config-all-devices.mak
+
 SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
 
-subdir-%: config-host.h
+subdir-%: config-host.h config-all-devices.h
        $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
 
 $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
index 1f2f9bcf9b06cbb8d0521c66ceeab4a743e4298f..191d9793323889147ba38c3d73f340c964da010b 100644 (file)
@@ -30,7 +30,10 @@ kvm.o kvm-all.o: QEMU_CFLAGS+=$(KVM_CFLAGS)
 config-target.h: config-target.h-timestamp
 config-target.h-timestamp: config-target.mak
 
-all: config-target.h
+config-devices.h: config-devices.h-timestamp
+config-devices.h-timestamp: config-devices.mak
+
+all: config-target.h config-devices.h
        $(call quiet-command, $(MAKE) $(PROGS),)
 
 # Dummy command so that make thinks it has done something
index 516acee6c55614faf7fa1714a652d5fdf6074196..07d79d4ba17032179d0a4a48f4542cc7fc3a37c0 100644 (file)
--- a/config.h
+++ b/config.h
@@ -1,3 +1,13 @@
 
 #include "config-host.h"
 #include "config-target.h"
+
+/* We want to include different config files for specific targets
+   And for the common library.  They need a different name because
+   we don't want to rely in paths */
+
+#if defined(NEED_CPU_H)
+#include "config-devices.h"
+#else
+#include "config-all-devices.h"
+#endif