* [Qemu-devel] .gitignore contains .c and .h ?
@ 2015-05-04 7:47 Guillaume Le Louët
2015-05-04 11:01 ` Thomas Huth
0 siblings, 1 reply; 4+ messages in thread
From: Guillaume Le Louët @ 2015-05-04 7:47 UTC (permalink / raw)
To: qemu-devel
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 ?
regards, Guillaume
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] .gitignore contains .c and .h ?
2015-05-04 7:47 [Qemu-devel] .gitignore contains .c and .h ? Guillaume Le Louët
@ 2015-05-04 11:01 ` Thomas Huth
2015-05-04 11:37 ` Guillaume Le Louët
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2015-05-04 11:01 UTC (permalink / raw)
To: Guillaume Le Louët; +Cc: qemu-devel
On Mon, 04 May 2015 09:47:11 +0200
Guillaume Le Louët <guillaume.lelouet@gmail.com> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] .gitignore contains .c and .h ?
2015-05-04 11:01 ` Thomas Huth
@ 2015-05-04 11:37 ` Guillaume Le Louët
2015-05-04 11:59 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Guillaume Le Louët @ 2015-05-04 11:37 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-devel
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 <guillaume.lelouet@gmail.com> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] .gitignore contains .c and .h ?
2015-05-04 11:37 ` Guillaume Le Louët
@ 2015-05-04 11:59 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-05-04 11:59 UTC (permalink / raw)
To: Guillaume Le Louët; +Cc: Thomas Huth, QEMU Developers
On 4 May 2015 at 12:37, Guillaume Le Louët <guillaume.lelouet@gmail.com> wrote:
> 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
> ?
If you want to keep generated files out of your source tree
I would recommend using a separate build tree:
mkdir build/whatever && (cd build/whatever && ../../configure [args here])
make -C build/whatever
(You'll need to distclean your tree first if you've been doing
in-source-tree builds.)
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-04 12:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-04 7:47 [Qemu-devel] .gitignore contains .c and .h ? Guillaume Le Louët
2015-05-04 11:01 ` Thomas Huth
2015-05-04 11:37 ` Guillaume Le Louët
2015-05-04 11:59 ` Peter Maydell
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).