From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpEh6-0007Yq-Jk for qemu-devel@nongnu.org; Mon, 04 May 2015 07:37:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpEh3-0000jr-9V for qemu-devel@nongnu.org; Mon, 04 May 2015 07:37:52 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:34023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpEh3-0000jn-2i for qemu-devel@nongnu.org; Mon, 04 May 2015 07:37:49 -0400 Received: by wgso17 with SMTP id o17so147138167wgs.1 for ; Mon, 04 May 2015 04:37:48 -0700 (PDT) Message-ID: <55475A0A.1000007@gmail.com> Date: Mon, 04 May 2015 13:37:46 +0200 From: =?UTF-8?B?R3VpbGxhdW1lIExlIExvdcOrdA==?= MIME-Version: 1.0 References: <554723FF.70406@gmail.com> <20150504130102.2b796406@thh440s> In-Reply-To: <20150504130102.2b796406@thh440s> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] .gitignore contains .c and .h ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: qemu-devel@nongnu.org You're right, I noticed that compiling with make was removing my modifications. I ended up modifying the qapi-schema.json . May I advise to move the generated .c and .h files into a generated/ folder ? Thank you Thomas. Le 04/05/2015 13:01, Thomas Huth a écrit : > On Mon, 04 May 2015 09:47:11 +0200 > Guillaume Le Louët wrote: > >> Hello. >> >> The .gitignore in the master branch contains the following lines : >> /qapi-types.[ch] >> /qapi-visit.[ch] >> /qapi-event.[ch] >> >> Why is it so ? Are they generated automatically each time I compile the >> project ? >> I am modifying qapi-types.h and qapi-types.c , am I doing wrong ? > Yes, they are created automatically and you should not edit them > manually. Just have a look at the main Makefile: > > qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \ > $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json \ > $(SRC_PATH)/qapi/event.json > > qapi-types.c qapi-types.h :\ > $(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) > $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \ > $(gen-out-type) -o "." -b -i $<, \ > " GEN $@") > > So if you want to change something in this area, you likely have to > touch the *.json files instead. > > Thomas