[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Proper use of unnest-vars (was: [PATCH v5 00/18] qapi:
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] Proper use of unnest-vars (was: [PATCH v5 00/18] qapi: add #if pre-processor conditions to generated code (part 3)) |
Date: |
Fri, 15 Feb 2019 09:29:33 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 15/02/19 08:53, Markus Armbruster wrote:
> This time, $(obj-y) is very much not blank, and...
>
> @qapi/ final qapi-introspect.o qapi-types-target.o qapi-types.o
> qapi-visit-target.o qapi-visit.o qapi-events-target.o qapi-events.o
> qapi-commands-target.o qapi-commands.o
> [Trailing make output elided]
>
> ... qapi/Makefile.obj-y *does* clobber it. Oww.
>
> How come this works anyway?
It works because at this point obj-y is not used anymore, it is assigned
to all-obj-y a couple lines before:
all-obj-y := $(obj-y)
As an aside, target-obj-y seems unnecessary to me.
> Perhaps unnest-vars could be more hygienic.
Macro hygiene and Make in the same sentence? (well, not sentence but
still...).
> But that's not my immediate
> concern. All I want to know right now is whether I should refrain from
> = and := in Makefile.objs. Paolo, Fam?
No, there is no need for that.
Really the answer is that we are kind of pushing Makefiles to the limit
here. We do get good expressiveness, but at the cost of hiding things
behind black magic. In the end I think it's a net benefit, but the cost
does exist.
Paolo
- [Qemu-devel] [PATCH v5 13/18] qapi: make query-cpu-model-expansion depend on s390 or x86, (continued)
- [Qemu-devel] [PATCH v5 13/18] qapi: make query-cpu-model-expansion depend on s390 or x86, Markus Armbruster, 2019/02/14
- [Qemu-devel] [PATCH v5 05/18] qapi: Generate QAPIEvent stuff into separate files, Markus Armbruster, 2019/02/14
- [Qemu-devel] [PATCH v5 12/18] qapi: make query-gic-capabilities depend on TARGET_ARM, Markus Armbruster, 2019/02/14
- [Qemu-devel] [PATCH v5 17/18] qmp: Deprecate query-events in favor of query-qmp-schema, Markus Armbruster, 2019/02/14
- [Qemu-devel] [PATCH v5 14/18] qapi: make query-cpu-definitions depend on specific targets, Markus Armbruster, 2019/02/14
- [Qemu-devel] [PATCH v5 18/18] qapi: move RTC_CHANGE to the target schema, Markus Armbruster, 2019/02/14
- [Qemu-devel] [PATCH v5 02/18] qapi: Fix up documentation for recent commit a95291007b2, Markus Armbruster, 2019/02/14
- Re: [Qemu-devel] [PATCH v5 00/18] qapi: add #if pre-processor conditions to generated code (part 3), Markus Armbruster, 2019/02/14