qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] build: simplify and fix fix-obj-vars


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1/2] build: simplify and fix fix-obj-vars
Date: Thu, 08 May 2014 16:39:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

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)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]