qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <daahern@cisco.com>
To: qemu-devel@nongnu.org
Cc: David Ahern <daahern@cisco.com>
Subject: [Qemu-devel] [PATCH 02/11] config: settings from default-configs need to be included in header files
Date: Fri, 14 Jan 2011 12:12:12 -0700	[thread overview]
Message-ID: <1295032341-6926-3-git-send-email-daahern@cisco.com> (raw)
In-Reply-To: <1295032341-6926-1-git-send-email-daahern@cisco.com>

Currently, device config settings in the default-configs file are not propogated into the config*.h files. While the Makefile rules observe them through the *.mak files, the CONFIG options are not usable within the .c files.

This patch adds the settings to the header files. To do that the host devices make file is renamed to config-host-devices.mak and the target devices mak file to config-target-devices.mak.

Signed-off-by: David Ahern <daahern@cisco.com>
---
 Makefile        |   16 ++++++++--------
 Makefile.hw     |    2 +-
 Makefile.target |    4 ++--
 rules.mak       |    4 ++--
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/Makefile b/Makefile
index 6d601ee..bce5188 100644
--- a/Makefile
+++ b/Makefile
@@ -38,15 +38,15 @@ DOCS=
 endif
 
 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
-SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
-SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %/config-devices.mak.d, $(TARGET_DIRS))
+SUBDIR_DEVICES_MAK=$(patsubst %, %/config-target-devices.mak, $(TARGET_DIRS))
+SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %/config-target-devices.mak.d, $(TARGET_DIRS))
 
-config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
+config-host-devices.mak: $(SUBDIR_DEVICES_MAK)
 	$(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep =y | sort -u > $@,"  GEN   $@")
 
 -include $(SUBDIR_DEVICES_MAK_DEP)
 
-%/config-devices.mak: default-configs/%.mak
+%/config-target-devices.mak: default-configs/%.mak
 	$(call quiet-command,$(SHELL) $(SRC_PATH)/make_device_config.sh $@ $<, "  GEN   $@")
 	@if test -f $@; then \
 	  if cmp -s $@.old $@; then \
@@ -67,14 +67,14 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
 	 fi
 
 defconfig:
-	rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK)
+	rm -f config-host-devices.mak $(SUBDIR_DEVICES_MAK)
 
--include config-all-devices.mak
+-include config-host-devices.mak
 
 build-all: $(DOCS) $(TOOLS) recurse-all
 
 config-host.h: config-host.h-timestamp
-config-host.h-timestamp: config-host.mak
+config-host.h-timestamp: config-host.mak config-host-devices.mak
 qemu-options.def: $(SRC_PATH)/qemu-options.hx
 	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $@")
 
@@ -191,7 +191,7 @@ clean:
 
 distclean: clean
 	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
-	rm -f config-all-devices.mak
+	rm -f config-host-devices.mak
 	rm -f roms/seabios/config.mak roms/vgabios/config.mak
 	rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.dvi qemu-doc.fn qemu-doc.info qemu-doc.ky qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp qemu-doc.vr
 	rm -f qemu-tech.info qemu-tech.aux qemu-tech.cp qemu-tech.dvi qemu-tech.fn qemu-tech.info qemu-tech.ky qemu-tech.log qemu-tech.pdf qemu-tech.pg qemu-tech.toc qemu-tech.tp qemu-tech.vr
diff --git a/Makefile.hw b/Makefile.hw
index b9181ab..3e97b0b 100644
--- a/Makefile.hw
+++ b/Makefile.hw
@@ -1,7 +1,7 @@
 # Makefile for qemu target independent devices.
 
 include ../config-host.mak
-include ../config-all-devices.mak
+include ../config-host-devices.mak
 include config.mak
 include $(SRC_PATH)/rules.mak
 
diff --git a/Makefile.target b/Makefile.target
index e15b1c4..f3ed066 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -5,7 +5,7 @@ CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y)
 CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
 
 include ../config-host.mak
-include config-devices.mak
+include config-target-devices.mak
 include config-target.mak
 include $(SRC_PATH)/rules.mak
 ifneq ($(HWDIR),)
@@ -40,7 +40,7 @@ endif
 kvm.o kvm-all.o vhost.o vhost_net.o: QEMU_CFLAGS+=$(KVM_CFLAGS)
 
 config-target.h: config-target.h-timestamp
-config-target.h-timestamp: config-target.mak
+config-target.h-timestamp: config-target.mak config-target-devices.mak
 
 ifdef CONFIG_SYSTEMTAP_TRACE
 stap: $(QEMU_PROG).stp
diff --git a/rules.mak b/rules.mak
index 6dac777..4425850 100644
--- a/rules.mak
+++ b/rules.mak
@@ -56,8 +56,8 @@ find-in-path = $(if $(find-string /, $1), \
 %.h: %.h-timestamp
 	@test -f $@ || cp $< $@
 
-%.h-timestamp: %.mak
-	$(call quiet-command, sh $(SRC_PATH)/create_config < $< > $@, "  GEN   $*.h")
+%.h-timestamp: %.mak %-devices.mak
+	$(call quiet-command, cat $^ | $(SRC_PATH)/create_config > $@, "  GEN   $*.h")
 	@cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h
 
 # will delete the target of a rule if commands exit with a nonzero exit status
-- 
1.7.3.4

  parent reply	other threads:[~2011-01-14 19:12 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14 19:12 [Qemu-devel] [PATCH 00/11] misc cleanups for use of config settings David Ahern
2011-01-14 19:12 ` [Qemu-devel] [PATCH 01/11] fix 'no such file' error from make_device_config.sh David Ahern
2011-01-14 21:04   ` Stefan Weil
2011-01-14 21:16     ` David Ahern
2011-01-15 15:42   ` [Qemu-devel] " Paolo Bonzini
2011-01-14 19:12 ` David Ahern [this message]
2011-01-14 20:17   ` [Qemu-devel] [PATCH 02/11] config: settings from default-configs need to be included in header files Blue Swirl
2011-01-14 20:24     ` David Ahern
2011-01-14 20:31       ` Blue Swirl
2011-01-14 20:47         ` David Ahern
2011-01-14 20:57           ` Blue Swirl
2011-01-14 21:04             ` David Ahern
2011-01-14 21:36               ` Blue Swirl
2011-01-14 21:54                 ` David Ahern
2011-01-15 16:18                 ` [Qemu-devel] " Paolo Bonzini
2011-01-15 16:30                   ` Blue Swirl
2011-01-14 19:12 ` [Qemu-devel] [PATCH 03/11] config: fix compile for CONFIG_VMWARE_VGA=n David Ahern
2011-01-14 19:12 ` [Qemu-devel] [PATCH 04/11] config: fix compile for CONFIG_PARALLEL=n David Ahern
2011-01-14 19:12 ` [Qemu-devel] [PATCH 05/11] remove unused parallel_* variables from pc.c David Ahern
2011-01-14 19:12 ` [Qemu-devel] [PATCH 06/11] config: fix compile for CONFIG_NE2000_ISA=n David Ahern
2011-01-14 19:12 ` [Qemu-devel] [PATCH 07/11] config: handle CONFIG_VGA_ISA=n David Ahern
2011-01-15 15:43   ` [Qemu-devel] " Paolo Bonzini
2011-01-14 19:12 ` [Qemu-devel] [PATCH 08/11] config: fix compile for CONFIG_IDE_ISA=n David Ahern
2011-01-14 19:12 ` [Qemu-devel] [PATCH 09/11] config: fix compile for CONFIG_FDC=n David Ahern
2011-01-14 19:12 ` [Qemu-devel] [PATCH 10/11] config: add CONFIG_APPLESMC David Ahern
2011-01-15 15:44   ` [Qemu-devel] " Paolo Bonzini
2011-01-14 19:12 ` [Qemu-devel] [PATCH 11/11] config: allow none as a configure option to disable all sound cards David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1295032341-6926-3-git-send-email-daahern@cisco.com \
    --to=daahern@cisco.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).