From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: mjt@tls.msk.ru, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] build: simplify and fix fix-obj-vars
Date: Thu, 08 May 2014 16:39:58 +0200 [thread overview]
Message-ID: <536B973E.80202@redhat.com> (raw)
In-Reply-To: <20140508134050.GA4827@T430.nay.redhat.com>
Il 08/05/2014 15:40, Fam Zheng ha scritto:
>> > define fix-obj-vars
>> > -$(foreach v,$($1), \
>> > +$(if $2,
>> > + $(foreach v,$($1), \
> Not very consistent in indentation. BTW what's the right space/tab style to
> use in Makefiles for multi-line macros like this?
No idea... I'll just join the two lines.
>> > $(if $($v-cflags), \
>> > - $(eval $2$v-cflags := $($v-cflags)) \
>> > + $(eval $2/$v-cflags := $($v-cflags)) \
>> > $(eval $v-cflags := )) \
>> > $(if $($v-libs), \
>> > - $(eval $2$v-libs := $($v-libs)) \
>> > + $(eval $2/$v-libs := $($v-libs)) \
>> > $(eval $v-libs := )) \
>> > $(if $($v-objs), \
>> > - $(eval $2$v-objs := $(addprefix $2,$($v-objs))) \
>> > - $(eval $v-objs := )))
>> > + $(eval $2/$v-objs := $(addprefix $2/,$($v-objs))) \
>> > + $(eval $v-objs := ))))
>> > endef
>> >
>> > define unnest-dir
>> > @@ -192,7 +193,7 @@ $(foreach var,$(nested-vars),$(call push-var,$(var),$1/))
>> > $(eval obj-parent-$1 := $(obj))
>> > $(eval obj := $(if $(obj),$(obj)/$1,$1))
>> > $(eval include $(SRC_PATH)/$1/Makefile.objs)
>> > -$(foreach v,$(nested-vars),$(call fix-obj-vars,$v,$(if $(obj),$(obj)/)))
>> > +$(foreach v,$(nested-vars),$(call fix-obj-vars,$v,$(obj)))
>> > $(eval obj := $(obj-parent-$1))
>> > $(eval obj-parent-$1 := )
>> > $(foreach var,$(nested-vars),$(call pop-var,$(var),$1/))
>> > @@ -228,7 +229,7 @@ endef
>> > define unnest-vars
>> > $(eval obj := $1)
>> > $(eval nested-vars := $2)
>> > -$(foreach v,$(nested-vars),$(call fix-obj-vars,$v,$(if $(obj),$(obj)/)))
> I'm not sure about this removed line since it's not in master, maybe you missed
> a patch to squash?
It's the original fix-obj-vars fix.
Paolo
>> > +$(foreach v,$(nested-vars),$(call fix-obj-vars,$v,$(obj)))
next prev parent reply other threads:[~2014-05-08 15:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-08 13:08 [Qemu-devel] [PATCH 0/2] build: simplify and fix fix-obj-vars, more libcacard cleanups Paolo Bonzini
2014-05-08 13:08 ` [Qemu-devel] [PATCH 1/2] build: simplify and fix fix-obj-vars Paolo Bonzini
2014-05-08 13:40 ` Fam Zheng
2014-05-08 14:39 ` Paolo Bonzini [this message]
2014-05-08 13:08 ` [Qemu-devel] [PATCH 2/2] build: more libcacard cleanups Paolo Bonzini
2014-05-08 13:16 ` Michael Tokarev
2014-05-08 13:28 ` Paolo Bonzini
2014-05-08 13:33 ` Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=536B973E.80202@redhat.com \
--to=pbonzini@redhat.com \
--cc=famz@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).