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

Re: [Xen-devel] [PATCH 02/13] Config.mk: replace dependency to genpath with actual target

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.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.