From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50889 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAm5R-0003in-He for qemu-devel@nongnu.org; Tue, 26 Oct 2010 12:09:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAm5J-0004b3-4f for qemu-devel@nongnu.org; Tue, 26 Oct 2010 12:09:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PAm5I-0004aw-UO for qemu-devel@nongnu.org; Tue, 26 Oct 2010 12:09:13 -0400 Date: Tue, 26 Oct 2010 18:02:33 +0200 From: "Michael S. Tsirkin" Message-ID: <20101026160233.GA15707@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] qemu-options.def: add to generated header list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Anthony Liguori All files include qemu-options.h which pulls in qemu-options.def from the root directory. Thus generating qemu-options.def from Makefile.objs under the target directory is not effective. Further, people expect .def file to get cleaned with make clean: it does not have state so no reason to defer removing it until distclean. Also add a rule to remove old files that might be around. This should fix the error: =E2=80=98QEMU_OPTION_spice=E2=80=99 undeclared (first use in this function) error that some people reported which is really down to an out of date .def file. Signed-off-by: Michael S. Tsirkin --- Makefile | 7 +++++-- Makefile.objs | 7 ------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index a1434b1..cf8f48a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Makefile for QEMU. =20 -GENERATED_HEADERS =3D config-host.h trace.h +GENERATED_HEADERS =3D config-host.h trace.h qemu-options.def =20 ifneq ($(wildcard config-host.mak),) # Put the all: rule here so that config-host.mak can contain dependencie= s. @@ -71,6 +71,8 @@ build-all: $(DOCS) $(TOOLS) recurse-all =20 config-host.h: config-host.h-timestamp config-host.h-timestamp: config-host.mak +qemu-options.def: qemu-options.hx + $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $@") =20 SUBDIR_RULES=3D$(patsubst %,subdir-%, $(TARGET_DIRS)) =20 @@ -150,6 +152,7 @@ check-qjson: check-qjson.o qfloat.o qint.o qdict.o qs= tring.o qlist.o qbool.o qjs clean: # avoid old build problems by removing potentially incorrect old files rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h = gen-op-arm.h + rm -f qemu-options.def rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~ rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*= .o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d rm -f qemu-img-cmds.h @@ -157,11 +160,11 @@ clean: $(MAKE) -C tests clean for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser libdis libdis-user; do = \ if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ + rm -f $$d/qemu-options.def; \ done =20 distclean: clean rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-option= s.texi qemu-img-cmds.texi qemu-monitor.texi - rm -f qemu-options.def rm -f config-all-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 q= emu-doc.info qemu-doc.ky qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.t= oc qemu-doc.tp qemu-doc.vr diff --git a/Makefile.objs b/Makefile.objs index f07fb01..231219c 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -285,10 +285,3 @@ vl.o: QEMU_CFLAGS+=3D$(GPROF_CFLAGS) =20 vl.o: QEMU_CFLAGS+=3D$(SDL_CFLAGS) =20 -vl.o: qemu-options.def -os-posix.o: qemu-options.def -os-win32.o: qemu-options.def - -qemu-options.def: $(SRC_PATH)/qemu-options.hx - $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARG= ET_DIR)$@") - --=20 1.7.3-rc1