|
From: | Paolo Bonzini |
Subject: | [Qemu-devel] Re: [PATCH 2/2] trace: avoid unnecessary recompilation if nothing changed |
Date: | Mon, 27 Sep 2010 18:16:55 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.3 |
On 09/27/2010 06:13 PM, Blue Swirl wrote:
Indeed, see how it's done for config-*.h. # Uses generic rule in rules.mak trace.h: trace.h-timestamp trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak $(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -h< $< > $@," GEN trace.h) @cmp $@ trace.h>/dev/null 2>&1 || cp $@ trace.h (untested).I just copied the rule from %/config-devices.mak. Is also that rule then incorrect?
config-devices.mak will cause the Makefile to be reread, but no recompilations, so it's fine not to use a timestamp file. Headers are more complicated.
Perhaps there could be a macro for this, not unlike move-if-change script in various GNU packages?
The problem is not really the move-if-change script, but rather the timestamping rules. You can use $(eval) for that but it quickly becomes unmanageable.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |