Patchwork [15/15] Generate gdbstub-xml.c only when there is anything to generate

login
register
mail settings
Submitter Juan Quintela
Date Aug. 24, 2009, 11:29 a.m.
Message ID <acec082e40785fe75b5b90b2c7c517c8a8ab2bcd.1251113143.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/31939/
State Superseded
Headers show

Comments

Juan Quintela - Aug. 24, 2009, 11:29 a.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    7 ++-----
 configure       |    3 ++-
 2 files changed, 4 insertions(+), 6 deletions(-)

Patch

diff --git a/Makefile.target b/Makefile.target
index e960f01..858f8bf 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -150,7 +150,8 @@  endif #CONFIG_BSD_USER
 ifdef CONFIG_SOFTMMU

 obj-y = vl.o osdep.o monitor.o pci.o loader.o machine.o \
-        gdbstub.o gdbstub-xml.o msix.o ioport.o qemu-config.o
+        gdbstub.o msix.o ioport.o qemu-config.o
+obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
 # virtio has to be here due to weird dependency between PCI and virtio-net.
 # need to fix this properly
 obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
@@ -302,11 +303,7 @@  $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) $(ARLIBS)


 gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh
-ifeq ($(TARGET_XML_FILES),)
-	$(call quiet-command,rm -f $@ && echo > $@,"  GEN   $(TARGET_DIR)$@")
-else
 	$(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES),"  GEN   $(TARGET_DIR)$@")
-endif

 qemu-options.h: $(SRC_PATH)/qemu-options.hx
 	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
diff --git a/configure b/configure
index a846428..0df3800 100755
--- a/configure
+++ b/configure
@@ -2098,8 +2098,9 @@  if test ! -z "$gdb_xml_files" ; then
   for x in $gdb_xml_files; do
     list="$list $source_path/gdb-xml/$x"
   done
+  echo "TARGET_XML_FILES=$list" >> $config_mak
+  echo "CONFIG_GDBSTUB_XML=y" >> $config_mak
 fi
-echo "TARGET_XML_FILES=$list" >> $config_mak

 case "$target_arch2" in
   arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|sparc|sparc64|sparc32plus)