From: Ian Campbell <ian.campbell@citrix.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: Keir Fraser <keir@xen.org>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Tim Deegan <tim@xen.org>, Ian Jackson <ian.jackson@eu.citrix.com>,
xen-devel@lists.xen.org, Jan Beulich <jbeulich@suse.com>,
Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: Re: [PATCH 02/13] Config.mk: replace dependency to genpath with actual target
Date: Thu, 28 Aug 2014 18:34:52 +0100 [thread overview]
Message-ID: <1409247292.21481.10.camel@citrix.com> (raw)
In-Reply-To: <20140827083648.GA5892@aepfle.de>
On Wed, 2014-08-27 at 10:36 +0200, Olaf Hering wrote:
> 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.
It seems that the bug here is that _paths.h is .PHONY then. Without that
the use of move-if-changed would prevent the output file changing
unnecessarily and make would not bother to rebuild the dependents.
> With _paths.h.tmp being .PHONY _paths.h remains the same for make.
>
> Not sure why that happens, perhaps thats how .PHONY works.
It essentially indicates to make that the target is not an actual file
(it is in some sense "virtual") so make never checks for an existing
file.
Ian.
next prev parent reply other threads:[~2014-08-28 17:34 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 9:05 [PATCH 00/13 v2] tools changes to honor --prefix= Olaf Hering
2014-07-28 9:05 ` [PATCH 01/13] Config.mk: move directory list into BUILD_MAKE_VARS Olaf Hering
2014-07-28 9:05 ` [PATCH 02/13] Config.mk: replace dependency to genpath with actual target Olaf Hering
2014-08-26 20:00 ` Ian Campbell
2014-08-27 8:36 ` Olaf Hering
2014-08-28 17:34 ` Ian Campbell [this message]
2014-08-29 6:33 ` Olaf Hering
2014-09-03 10:28 ` Ian Campbell
2014-09-03 10:43 ` Olaf Hering
2014-09-17 10:02 ` Olaf Hering
2014-09-17 16:53 ` Ian Campbell
2014-09-18 8:09 ` Olaf Hering
2014-09-18 17:44 ` Ian Campbell
2014-09-19 6:55 ` Olaf Hering
2014-07-28 9:05 ` [PATCH 03/13] Config.mk: add new macro buildmakevars2header Olaf Hering
2014-08-26 20:02 ` Ian Campbell
2014-07-28 9:05 ` [PATCH 04/13] tools/libxl: use buildmakevars2header to create _paths.h Olaf Hering
2014-07-28 9:05 ` [PATCH 05/13] tools/libxc: provide variable paths to libxc Olaf Hering
2014-07-28 9:05 ` [PATCH 06/13] tools/libxc: use XEN_RUN_DIR for SUSPEND_LOCK_FILE Olaf Hering
2014-07-28 9:05 ` [PATCH 07/13] tools/pygrub: store kernels in /var/run/xen/pygrub Olaf Hering
2014-08-26 20:04 ` Ian Campbell
2014-07-28 9:05 ` [PATCH 08/13] tools/hotplug: use XEN_SCRIPT_DIR instead of hardcoded path Olaf Hering
2014-08-26 20:07 ` Ian Campbell
2014-08-27 8:42 ` Olaf Hering
2014-07-28 9:05 ` [PATCH 09/13] tools/hotplug: create XEN_RUN_DIR at runtime Olaf Hering
2014-07-28 9:05 ` [PATCH 10/13] tools/hotplug: create XEN_LOCK_DIR " Olaf Hering
2014-07-28 9:05 ` [PATCH 11/13] tools/hotplug: use XEN_LOCK_DIR instead of hardcoded path Olaf Hering
2014-08-26 20:08 ` Ian Campbell
2014-07-28 9:05 ` [PATCH 12/13] tools/examples: remove obsolete install targets Olaf Hering
2014-07-28 9:05 ` [PATCH 13/13] remove obsolete SUBSYS_DIR variable Olaf Hering
2014-08-26 20:08 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1409247292.21481.10.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=olaf@aepfle.de \
--cc=samuel.thibault@ens-lyon.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).