diff mbox

[1/8] Move -I$(SRC_PATH)/include compiler flag to Makefile.objs

Message ID 1354726153-30264-2-git-send-email-ehabkost@redhat.com
State New
Headers show

Commit Message

Eduardo Habkost Dec. 5, 2012, 4:49 p.m. UTC
The flag is necessary for code that doesn't use the variables from
Makefile (but use Makefile.objs), like libcacard/ and stubs/.

This also moves the existing CFLAGS lines from Makefile.objs at the
beginning of the file, to keep them all in the same place.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 Makefile      |  1 -
 Makefile.objs | 15 +++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)

Comments

Andreas Färber Dec. 14, 2012, 3:34 p.m. UTC | #1
Am 05.12.2012 17:49, schrieb Eduardo Habkost:
> The flag is necessary for code that doesn't use the variables from
> Makefile (but use Makefile.objs), like libcacard/ and stubs/.
> 
> This also moves the existing CFLAGS lines from Makefile.objs at the
> beginning of the file, to keep them all in the same place.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Waiting for ack or nack from Paolo here. I am expecting some overlap
with his header file reorganization series.

My previous (unanswered?) question was why you are moving vl.o lines in
addition to the QEMU_CFLAGS lines that you mention in the commit message.

Andreas

> ---
>  Makefile      |  1 -
>  Makefile.objs | 15 +++++++++------
>  2 files changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 9ecbcbb..739d9cd 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -145,7 +145,6 @@ audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
>  
>  QEMU_CFLAGS+=$(CURL_CFLAGS)
>  
> -QEMU_CFLAGS += -I$(SRC_PATH)/include
>  
>  ui/cocoa.o: ui/cocoa.m
>  
> diff --git a/Makefile.objs b/Makefile.objs
> index 3c7abca..0a0a33a 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -1,4 +1,13 @@
>  #######################################################################
> +# general compiler flags
> +
> +QEMU_CFLAGS += $(GLIB_CFLAGS)
> +QEMU_CFLAGS += -I$(SRC_PATH)/include
> +
> +vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
> +vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
> +
> +#######################################################################
>  # Stub library, linked in tools
>  stub-obj-y = stubs/
>  
> @@ -236,12 +245,6 @@ universal-obj-y += $(qapi-obj-y)
>  qga-obj-y = qga/ qemu-ga.o module.o qemu-tool.o
>  qga-obj-$(CONFIG_POSIX) += qemu-sockets.o qemu-option.o
>  
> -vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
> -
> -vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
> -
> -QEMU_CFLAGS+=$(GLIB_CFLAGS)
> -
>  nested-vars += \
>  	stub-obj-y \
>  	qga-obj-y \
>
Paolo Bonzini Dec. 14, 2012, 3:38 p.m. UTC | #2
Il 14/12/2012 16:34, Andreas Färber ha scritto:
> Am 05.12.2012 17:49, schrieb Eduardo Habkost:
>> The flag is necessary for code that doesn't use the variables from
>> Makefile (but use Makefile.objs), like libcacard/ and stubs/.
>>
>> This also moves the existing CFLAGS lines from Makefile.objs at the
>> beginning of the file, to keep them all in the same place.
>>
>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> 
> Waiting for ack or nack from Paolo here. I am expecting some overlap
> with his header file reorganization series.

Yeah, I expect that series to go in early next week.  Waiting for Blue
to pull from Alexander.

Paolo

> My previous (unanswered?) question was why you are moving vl.o lines in
> addition to the QEMU_CFLAGS lines that you mention in the commit message.
> 
> Andreas
> 
>> ---
>>  Makefile      |  1 -
>>  Makefile.objs | 15 +++++++++------
>>  2 files changed, 9 insertions(+), 7 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 9ecbcbb..739d9cd 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -145,7 +145,6 @@ audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
>>  
>>  QEMU_CFLAGS+=$(CURL_CFLAGS)
>>  
>> -QEMU_CFLAGS += -I$(SRC_PATH)/include
>>  
>>  ui/cocoa.o: ui/cocoa.m
>>  
>> diff --git a/Makefile.objs b/Makefile.objs
>> index 3c7abca..0a0a33a 100644
>> --- a/Makefile.objs
>> +++ b/Makefile.objs
>> @@ -1,4 +1,13 @@
>>  #######################################################################
>> +# general compiler flags
>> +
>> +QEMU_CFLAGS += $(GLIB_CFLAGS)
>> +QEMU_CFLAGS += -I$(SRC_PATH)/include
>> +
>> +vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
>> +vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
>> +
>> +#######################################################################
>>  # Stub library, linked in tools
>>  stub-obj-y = stubs/
>>  
>> @@ -236,12 +245,6 @@ universal-obj-y += $(qapi-obj-y)
>>  qga-obj-y = qga/ qemu-ga.o module.o qemu-tool.o
>>  qga-obj-$(CONFIG_POSIX) += qemu-sockets.o qemu-option.o
>>  
>> -vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
>> -
>> -vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
>> -
>> -QEMU_CFLAGS+=$(GLIB_CFLAGS)
>> -
>>  nested-vars += \
>>  	stub-obj-y \
>>  	qga-obj-y \
>>
> 
>
Eduardo Habkost Dec. 14, 2012, 5:21 p.m. UTC | #3
On Fri, Dec 14, 2012 at 04:34:29PM +0100, Andreas Färber wrote:
> Am 05.12.2012 17:49, schrieb Eduardo Habkost:
> > The flag is necessary for code that doesn't use the variables from
> > Makefile (but use Makefile.objs), like libcacard/ and stubs/.
> > 
> > This also moves the existing CFLAGS lines from Makefile.objs at the
> > beginning of the file, to keep them all in the same place.
> > 
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> 
> Waiting for ack or nack from Paolo here. I am expecting some overlap
> with his header file reorganization series.
> 
> My previous (unanswered?) question was why you are moving vl.o lines in
> addition to the QEMU_CFLAGS lines that you mention in the commit message.


I thought this note in the commit message would answer the question:

> > This also moves the existing CFLAGS lines from Makefile.objs at the
> > beginning of the file, to keep them all in the same place.

In other words: it's cosmetic, just to keep all the QEMU_CLFAGS lines
inside Makefile.objs grouped in a visible place at the beginning of the
file.

(You noticed that I am moving the vl.o lines _inside_ Makefile.obj,
right? They are not being moved between different files.)

> 
> Andreas
> 
> > ---
> >  Makefile      |  1 -
> >  Makefile.objs | 15 +++++++++------
> >  2 files changed, 9 insertions(+), 7 deletions(-)
> > 
> > diff --git a/Makefile b/Makefile
> > index 9ecbcbb..739d9cd 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -145,7 +145,6 @@ audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
> >  
> >  QEMU_CFLAGS+=$(CURL_CFLAGS)
> >  
> > -QEMU_CFLAGS += -I$(SRC_PATH)/include
> >  
> >  ui/cocoa.o: ui/cocoa.m
> >  
> > diff --git a/Makefile.objs b/Makefile.objs
> > index 3c7abca..0a0a33a 100644
> > --- a/Makefile.objs
> > +++ b/Makefile.objs
> > @@ -1,4 +1,13 @@
> >  #######################################################################
> > +# general compiler flags
> > +
> > +QEMU_CFLAGS += $(GLIB_CFLAGS)
> > +QEMU_CFLAGS += -I$(SRC_PATH)/include
> > +
> > +vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
> > +vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
> > +
> > +#######################################################################
> >  # Stub library, linked in tools
> >  stub-obj-y = stubs/
> >  
> > @@ -236,12 +245,6 @@ universal-obj-y += $(qapi-obj-y)
> >  qga-obj-y = qga/ qemu-ga.o module.o qemu-tool.o
> >  qga-obj-$(CONFIG_POSIX) += qemu-sockets.o qemu-option.o
> >  
> > -vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
> > -
> > -vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
> > -
> > -QEMU_CFLAGS+=$(GLIB_CFLAGS)
> > -
> >  nested-vars += \
> >  	stub-obj-y \
> >  	qga-obj-y \
> > 
> 
> 
> -- 
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Andreas Färber Jan. 2, 2013, 1:48 p.m. UTC | #4
Am 14.12.2012 18:21, schrieb Eduardo Habkost:
> On Fri, Dec 14, 2012 at 04:34:29PM +0100, Andreas Färber wrote:
>> Waiting for ack or nack from Paolo here. I am expecting some overlap
>> with his header file reorganization series.
>>
>> My previous (unanswered?) question was why you are moving vl.o lines in
>> addition to the QEMU_CFLAGS lines that you mention in the commit message.
> 
> 
> I thought this note in the commit message would answer the question:
> 
>>> This also moves the existing CFLAGS lines from Makefile.objs at the
>>> beginning of the file, to keep them all in the same place.
> 
> In other words: it's cosmetic, just to keep all the QEMU_CLFAGS lines
> inside Makefile.objs grouped in a visible place at the beginning of the
> file.
> 
> (You noticed that I am moving the vl.o lines _inside_ Makefile.obj,
> right? They are not being moved between different files.)

Nah, you caught me there, must've misread that on a previous submission
(or it changed or whatever).

Anyway, Paolo's header reorganization was pulled by now, so this patch
no longer seems necessary, series compiles without. Please shout if I'm
misreading this!

Andreas
Eduardo Habkost Jan. 2, 2013, 2:32 p.m. UTC | #5
On Wed, Jan 02, 2013 at 02:48:00PM +0100, Andreas Färber wrote:
> Am 14.12.2012 18:21, schrieb Eduardo Habkost:
> > On Fri, Dec 14, 2012 at 04:34:29PM +0100, Andreas Färber wrote:
> >> Waiting for ack or nack from Paolo here. I am expecting some overlap
> >> with his header file reorganization series.
> >>
> >> My previous (unanswered?) question was why you are moving vl.o lines in
> >> addition to the QEMU_CFLAGS lines that you mention in the commit message.
> > 
> > 
> > I thought this note in the commit message would answer the question:
> > 
> >>> This also moves the existing CFLAGS lines from Makefile.objs at the
> >>> beginning of the file, to keep them all in the same place.
> > 
> > In other words: it's cosmetic, just to keep all the QEMU_CLFAGS lines
> > inside Makefile.objs grouped in a visible place at the beginning of the
> > file.
> > 
> > (You noticed that I am moving the vl.o lines _inside_ Makefile.obj,
> > right? They are not being moved between different files.)
> 
> Nah, you caught me there, must've misread that on a previous submission
> (or it changed or whatever).
> 
> Anyway, Paolo's header reorganization was pulled by now, so this patch
> no longer seems necessary, series compiles without. Please shout if I'm
> misreading this!

Correct, commit 9d9199a003 from Paolo makes this patch unnecessary.
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 9ecbcbb..739d9cd 100644
--- a/Makefile
+++ b/Makefile
@@ -145,7 +145,6 @@  audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
 
 QEMU_CFLAGS+=$(CURL_CFLAGS)
 
-QEMU_CFLAGS += -I$(SRC_PATH)/include
 
 ui/cocoa.o: ui/cocoa.m
 
diff --git a/Makefile.objs b/Makefile.objs
index 3c7abca..0a0a33a 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -1,4 +1,13 @@ 
 #######################################################################
+# general compiler flags
+
+QEMU_CFLAGS += $(GLIB_CFLAGS)
+QEMU_CFLAGS += -I$(SRC_PATH)/include
+
+vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
+vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
+
+#######################################################################
 # Stub library, linked in tools
 stub-obj-y = stubs/
 
@@ -236,12 +245,6 @@  universal-obj-y += $(qapi-obj-y)
 qga-obj-y = qga/ qemu-ga.o module.o qemu-tool.o
 qga-obj-$(CONFIG_POSIX) += qemu-sockets.o qemu-option.o
 
-vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
-
-vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
-
-QEMU_CFLAGS+=$(GLIB_CFLAGS)
-
 nested-vars += \
 	stub-obj-y \
 	qga-obj-y \