[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 40/47] trace: switch target/s390x/ directory
From: |
Lluís Vilanova |
Subject: |
Re: [Qemu-devel] [PATCH v2 40/47] trace: switch target/s390x/ directory to modular trace.h file |
Date: |
Fri, 06 Jan 2017 21:45:08 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Daniel P Berrange writes:
> On Fri, Jan 06, 2017 at 06:09:16PM +0100, Lluís Vilanova wrote:
>> Daniel P Berrange writes:
>>
>> > Switch files in the target/s390x/ directory to include the
>> > target/s390x/trace.h file instead of the global trace.h
>> > file.
>>
>> > The make rules for gen-features.{h,c} need to be moved
>> > out into the top level Makefile.objs, otherwise make
>> > complains about the rules being defined multiple times
>> > due to target/s390x/Makefile.objs being included
>> > multiple times when expanding different subdir object
>> > lists.
>>
>> If the problem is re-definition, you can instead add a guard around the
>> rules in
>> target/s390x/Makefile.objs. This avoids defining the rules multiple times but
>> still keeps the target-specific rules in the target-specific makefile.
> What kind of guard to you mean ? What's happening is that the top
> level Makefile.target is including target/s390x/Makefile.objs
> multiple times to expand multiple vars. I don't see a way to
> distinguish which include we're being called from.
I think I did something like this to ensure rules are defined only once:
ifneq($(TRACE_GUARD_TARGET_S390X),1)
# ... rules ...
TRACE_GUARD_TARGET_S390X=1
endif
It's not the cleanest solution, but neither is having target-specific rules in a
generic makefile. Choose your least evil.
Cheers,
Lluis
- [Qemu-devel] [PATCH v2 35/47] trace: switch audio/ directory to modular trace.h file, (continued)
- [Qemu-devel] [PATCH v2 35/47] trace: switch audio/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 36/47] trace: switch net/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 37/47] trace: switch target/arm/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 38/47] trace: switch target/i386/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 41/47] trace: switch target/ppc/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 39/47] trace: switch target/sparc/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 42/47] trace: switch qom/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 40/47] trace: switch target/s390x/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 44/47] trace: switch qapi/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 46/47] trace: update docs to reflect new code generation approach, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 47/47] trace: improve error reporting when parsing simpletrace header, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 45/47] trace: remove the global include/trace.h file, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 43/47] trace: switch linux-user/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/06
- Re: [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file, Daniel P. Berrange, 2017/01/06