* [Qemu-devel] [PATCH 0/2] buildsys: Convert SDL_CFLAGS to .mo-cflags
@ 2014-10-28 8:47 Fam Zheng
2014-10-28 8:47 ` [Qemu-devel] [PATCH 1/2] rules.mak: Allow .mo-objs and .mo-cflags in -y variables Fam Zheng
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fam Zheng @ 2014-10-28 8:47 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Michael Tokarev, Peter Maydell
This is actually the first user of the *.mo rule syntax. It's the recommended
way to specify per object flags, which also makes the sophisticated rules in
rules.mak less likely to bit rot.
Fam
Fam Zheng (2):
rules.mak: Allow .mo-objs and .mo-cflags in -y variables
ui: Use the new ".mo-cflags" rule syntax for SDL_CFLAGS
rules.mak | 5 +++++
ui/Makefile.objs | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 1/2] rules.mak: Allow .mo-objs and .mo-cflags in -y variables
2014-10-28 8:47 [Qemu-devel] [PATCH 0/2] buildsys: Convert SDL_CFLAGS to .mo-cflags Fam Zheng
@ 2014-10-28 8:47 ` Fam Zheng
2014-10-28 8:47 ` [Qemu-devel] [PATCH 2/2] ui: Use the new ".mo-cflags" rule syntax for SDL_CFLAGS Fam Zheng
2014-10-29 12:57 ` [Qemu-devel] [PATCH 0/2] buildsys: Convert SDL_CFLAGS to .mo-cflags Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Fam Zheng @ 2014-10-28 8:47 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Michael Tokarev, Peter Maydell
Expand %.mo-objs in -y nested objects, so that we can write combined
object -cflags rules like what will be done in the coming patch.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
rules.mak | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/rules.mak b/rules.mak
index cf76b88..f500fef 100644
--- a/rules.mak
+++ b/rules.mak
@@ -362,4 +362,9 @@ define unnest-vars
# Include all the .d files
$(eval -include $(addsuffix *.d, $(sort $(dir $($v)))))
$(eval $v := $(filter-out %/,$($v))))
+
+ # For all %.mo objects that are directly added into -y, expand them to %.mo-objs
+ $(foreach v,$2,
+ $(eval $v := $(foreach o,$($v),$(if $($o-objs),$($o-objs),$o))))
+
endef
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/2] ui: Use the new ".mo-cflags" rule syntax for SDL_CFLAGS
2014-10-28 8:47 [Qemu-devel] [PATCH 0/2] buildsys: Convert SDL_CFLAGS to .mo-cflags Fam Zheng
2014-10-28 8:47 ` [Qemu-devel] [PATCH 1/2] rules.mak: Allow .mo-objs and .mo-cflags in -y variables Fam Zheng
@ 2014-10-28 8:47 ` Fam Zheng
2014-10-29 12:57 ` [Qemu-devel] [PATCH 0/2] buildsys: Convert SDL_CFLAGS to .mo-cflags Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Fam Zheng @ 2014-10-28 8:47 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Michael Tokarev, Peter Maydell
Signed-off-by: Fam Zheng <famz@redhat.com>
---
ui/Makefile.objs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ui/Makefile.objs b/ui/Makefile.objs
index 6afb52a..801cba2 100644
--- a/ui/Makefile.objs
+++ b/ui/Makefile.objs
@@ -10,12 +10,13 @@ vnc-obj-y += vnc-jobs.o
common-obj-y += keymaps.o console.o cursor.o qemu-pixman.o
common-obj-y += input.o input-keymap.o input-legacy.o
common-obj-$(CONFIG_SPICE) += spice-core.o spice-input.o spice-display.o
-common-obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o sdl2.o
+common-obj-$(CONFIG_SDL) += sdl.mo x_keymap.o
common-obj-$(CONFIG_COCOA) += cocoa.o
common-obj-$(CONFIG_CURSES) += curses.o
common-obj-$(CONFIG_VNC) += $(vnc-obj-y)
common-obj-$(CONFIG_GTK) += gtk.o x_keymap.o
-$(obj)/sdl.o $(obj)/sdl_zoom.o $(obj)/sdl2.o: QEMU_CFLAGS += $(SDL_CFLAGS)
+sdl.mo-objs := sdl.o sdl_zoom.o sdl2.o
+sdl.mo-cflags := $(SDL_CFLAGS)
gtk.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS)
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] buildsys: Convert SDL_CFLAGS to .mo-cflags
2014-10-28 8:47 [Qemu-devel] [PATCH 0/2] buildsys: Convert SDL_CFLAGS to .mo-cflags Fam Zheng
2014-10-28 8:47 ` [Qemu-devel] [PATCH 1/2] rules.mak: Allow .mo-objs and .mo-cflags in -y variables Fam Zheng
2014-10-28 8:47 ` [Qemu-devel] [PATCH 2/2] ui: Use the new ".mo-cflags" rule syntax for SDL_CFLAGS Fam Zheng
@ 2014-10-29 12:57 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2014-10-29 12:57 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: Peter Maydell, Michael Tokarev
On 10/28/2014 09:47 AM, Fam Zheng wrote:
> This is actually the first user of the *.mo rule syntax. It's the recommended
> way to specify per object flags, which also makes the sophisticated rules in
> rules.mak less likely to bit rot.
Applied, thanks.
Paolo
> Fam
>
>
>
> Fam Zheng (2):
> rules.mak: Allow .mo-objs and .mo-cflags in -y variables
> ui: Use the new ".mo-cflags" rule syntax for SDL_CFLAGS
>
> rules.mak | 5 +++++
> ui/Makefile.objs | 5 +++--
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-29 12:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28 8:47 [Qemu-devel] [PATCH 0/2] buildsys: Convert SDL_CFLAGS to .mo-cflags Fam Zheng
2014-10-28 8:47 ` [Qemu-devel] [PATCH 1/2] rules.mak: Allow .mo-objs and .mo-cflags in -y variables Fam Zheng
2014-10-28 8:47 ` [Qemu-devel] [PATCH 2/2] ui: Use the new ".mo-cflags" rule syntax for SDL_CFLAGS Fam Zheng
2014-10-29 12:57 ` [Qemu-devel] [PATCH 0/2] buildsys: Convert SDL_CFLAGS to .mo-cflags Paolo Bonzini
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).