From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkL4K-0008Kj-AK for qemu-devel@nongnu.org; Mon, 09 Jan 2012 14:39:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkL4A-0004T4-Kc for qemu-devel@nongnu.org; Mon, 09 Jan 2012 14:39:44 -0500 Received: from e2.ny.us.ibm.com ([32.97.182.142]:34669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkL4A-0004Sk-FZ for qemu-devel@nongnu.org; Mon, 09 Jan 2012 14:39:34 -0500 Received: from /spool/local by e2.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Jan 2012 14:39:28 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q09Jd2v1275904 for ; Mon, 9 Jan 2012 14:39:02 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q09Jd18s007461 for ; Mon, 9 Jan 2012 17:39:01 -0200 Message-ID: <4F0B4253.3000903@us.ibm.com> Date: Mon, 09 Jan 2012 13:38:59 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1326124572-8312-1-git-send-email-aliguori@us.ibm.com> <1326124572-8312-2-git-send-email-aliguori@us.ibm.com> <4F0B3EA2.8010807@suse.de> In-Reply-To: <4F0B3EA2.8010807@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 02/11] build: split unit test builds to a separate makefile fragment List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: qemu-devel@nongnu.org, Luiz Capitulino On 01/09/2012 01:23 PM, Andreas Färber wrote: > Am 09.01.2012 16:56, schrieb Anthony Liguori: >> diff --git a/tests/Makefile b/tests/Makefile >> new file mode 100644 >> index 0000000..c11d980 >> --- /dev/null >> +++ b/tests/Makefile >> @@ -0,0 +1,31 @@ >> +check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o test-coroutine.o: $(GENERATED_HEADERS) >> + >> +check-qint: check-qint.o qint.o $(tools-obj-y) >> +check-qstring: check-qstring.o qstring.o $(tools-obj-y) >> +check-qdict: check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qlist.o $(tools-obj-y) >> +check-qlist: check-qlist.o qlist.o qint.o $(tools-obj-y) >> +check-qfloat: check-qfloat.o qfloat.o $(tools-obj-y) >> +check-qjson: check-qjson.o $(qobject-obj-y) $(tools-obj-y) >> +test-coroutine: test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) $(tools-obj-y) >> + >> +test-qmp-input-visitor.o test-qmp-output-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-dir) >> + >> +$(qapi-dir)/test-qapi-types.c $(qapi-dir)/test-qapi-types.h :\ >> +$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "$(qapi-dir)" -p "test-"< $<, " GEN $@") >> +$(qapi-dir)/test-qapi-visit.c $(qapi-dir)/test-qapi-visit.h :\ >> +$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-visit.py >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "$(qapi-dir)" -p "test-"< $<, " GEN $@") >> +$(qapi-dir)/test-qmp-commands.h $(qapi-dir)/test-qmp-marshal.c :\ >> +$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o "$(qapi-dir)" -p "test-"< $<, " GEN $@") >> + >> +test-qmp-output-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) >> +test-qmp-output-visitor: test-qmp-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o >> + >> +test-qmp-input-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) >> +test-qmp-input-visitor: test-qmp-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o >> + >> +test-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h test-qmp-marshal.c test-qmp-commands.h) $(qapi-obj-y) >> +test-qmp-commands: test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o >> + > > Would be nice if we could recurse into tests/ subdir... I've looked a lot into how we could make the build system nicer. As best as I can tell, making good use of recursive make files is very, very difficult to get right. I've tried a few times to prototype something and have not been all that successful. > If you don't > want that, please rename the file so that it is obvious. I can do that, I guess. I was going by Linux convention where even the subdirectory fragments are still called Makefile. > > Also, the new Makefile probably needs to be added to $FILES in configure > for out-of-tree builds? It doesn't. FILES creates symlinks but this makefile fragment is not directly buildable so it's not helpful to have it in the build directory Regards, Anthony Liguori > > Andreas >