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, 17 Sep 2014 12:02:07 +0200 Message-ID: <20140917100207.GA18753@aepfle.de> References: <1406538316-29087-1-git-send-email-olaf@aepfle.de> <1406538316-29087-3-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1406538316-29087-3-git-send-email-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Keir Fraser , Ian Campbell , Stefano Stabellini , Tim Deegan , Ian Jackson , Jan Beulich , Samuel Thibault List-Id: xen-devel@lists.xenproject.org A question related to the change below: How are the make variables supposed to be changed? Right now this can be done either with rerunning configure (untested by me) and by calling something like 'make SBINDIR=/x/y XEN_RUN_DIR=/a/b' (used as testcase). I think we should arrange the code such that a new configure run is required to change their value. Olaf On Mon, Jul 28, Olaf Hering wrote: > 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. > > Signed-off-by: Olaf Hering > --- > Config.mk | 9 +++++---- > stubdom/Makefile | 16 ++++++++-------- > tools/hotplug/common/Makefile | 2 +- > tools/libxl/Makefile | 2 +- > tools/python/Makefile | 2 +- > 5 files changed, 16 insertions(+), 15 deletions(-) > > diff --git a/Config.mk b/Config.mk > index 2408fa6..28e9930 100644 > --- a/Config.mk > +++ b/Config.mk > @@ -172,11 +172,12 @@ BUILD_MAKE_VARS := SBINDIR BINDIR LIBEXEC LIBDIR SHAREDIR PRIVATE_BINDIR \ > > buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1))) > define buildmakevars2file-closure > - .PHONY: genpath > - genpath: > - rm -f $(1).tmp; \ > + $(1).tmp: > + rm -f $(1).newtmp; \ > $(foreach var, $(BUILD_MAKE_VARS), \ > - echo "$(var)=\"$($(var))\"" >>$(1).tmp;) \ > + echo "$(var)=\"$($(var))\"" >>$(1).newtmp;) \ > + $(call move-if-changed,$(1).newtmp,$(1).tmp) > + $(1): $(1).tmp > $(call move-if-changed,$(1).tmp,$(1)) > endef