From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH 02/13] Config.mk: replace dependency to genpath with actual target Date: Wed, 27 Aug 2014 10:36:48 +0200 Message-ID: <20140827083648.GA5892@aepfle.de> References: <1406538316-29087-1-git-send-email-olaf@aepfle.de> <1406538316-29087-3-git-send-email-olaf@aepfle.de> <1409083253.28009.20.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1409083253.28009.20.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Keir Fraser , Stefano Stabellini , Tim Deegan , Ian Jackson , xen-devel@lists.xen.org, Jan Beulich , Samuel Thibault List-Id: xen-devel@lists.xenproject.org On Tue, Aug 26, Ian Campbell wrote: > On Mon, 2014-07-28 at 11:05 +0200, Olaf Hering wrote: > > Sorry for the delay in looking into this, I've been on vacation and > travel. > > > genpath is a detail of buildmakevars2file. Replace the dependency to > > genpath with the actual buildmakevars2file target. This change by > > itself does not fix any bug. Upcoming changes will add dependencies to > > $(target), but no rule exist to create $(target). > > > > No change in behaviour is expected by this patch. > > > > Note: target.tmp ($(1).tmp) is not marked as .PHONY because > > move-if-changed in the target rule will remove target.tmp by renaming > > it to target. As a result make will always attempt to rebuild it. > > Does the scheme you've got here end up differing from: > > $(1): > rm -f $(1).tmp; \ > $(foreach var, $(BUILD_MAKE_VARS), \ > echo "$(var)=\"$($(var))\"" >>$(1).tmp;) \ > $(call move-if-changed,$(1).tmp,$(1)) > > (i.e. avoiding the $(1).tmp rule) In my testing make did always rebuild the targets depending on _paths.h for example. The reason is that _paths.h is .PHONY, which cause make to drop _paths.h and see it as new, even if the content did not change. With _paths.h.tmp being .PHONY _paths.h remains the same for make. Not sure why that happens, perhaps thats how .PHONY works. Olaf