qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] [trivial] Simpler handling of tracetool-gen


From: Lluís Vilanova
Subject: Re: [Qemu-devel] [PATCH 2/2] [trivial] Simpler handling of tracetool-generated files in makefiles
Date: Wed, 18 Apr 2012 15:45:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Stefan Hajnoczi writes:

> On Sat, Apr 14, 2012 at 12:19:08AM +0200, Lluís Vilanova wrote:
>> trace.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
>> -    $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/tracetool.py 
>> --format=h --backend=$(TRACE_BACKEND) < $< > $@,"  GEN   trace.h")
>> -    @cmp -s $@ trace.h || cp $@ trace.h
>> +    $(call tracetool-gen,h,$(TRACE_BACKEND))
>> +    $(call tracetool-ci)

> Here I don't think it's worth introducing an abstraction.  While there
> is a pattern I think the abstraction actually hides what is going on
> rather than being useful.  The macros are hiding output generation, I
> find that especially troubling because you can't really tell what is
> going to happen.  It's clearer to leave these statements open coded.

I just thought it was excessively verbose. Would it work for you making it more
explicit?

     $(call tracetool-gen,$<,$@,h,$(TRACE_BACKEND))
     $(call tracetool-ci,$@)


The main points bugging me were:

* use of "quiet-command" plus explicit quiet compilation string (" GEN
  whatever").
* use of "$(PYTHON) $(SRC_PATH)/scripts/tracetool.py".


If not, I'll just drop it and instead simply replace calls to tracetool with
"$(TRACETOOL)".


Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth



reply via email to

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