[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
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 <olaf@xxxxxxxxx> > --- > 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |