From: Ian Campbell Subject: Re: [PATCH 8/9] tools/libxc: provide variable paths to libxc Date: Wed, 23 Apr 2014 12:15:09 +0100 Message-ID: <1398251709.18537.40.camel@kazak.uk.xensource.com> References: <1397744030-31806-1-git-send-email-olaf@aepfle.de> <1397744030-31806-9-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1397744030-31806-9-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: Olaf Hering Cc: Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2014-04-17 at 16:13 +0200, Olaf Hering wrote: > In preparation to removal of hardcoded /var/run/xen paths, provide > XEN_RUN_DIR and related directories to xc_private.h. Similar code exists > already for libxl, stubdom and other parts. > > Signed-off-by: Olaf Hering > --- > tools/libxc/Makefile | 13 ++++++++++++- > tools/libxc/xc_private.h | 1 + > 2 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile > index a74b19e..1bb6825 100644 > --- a/tools/libxc/Makefile > +++ b/tools/libxc/Makefile > @@ -118,11 +118,21 @@ ifneq ($(stubdom),y) > LIB += xenctrl_osdep_ENOSYS.so > endif > > +genpath-target = $(call buildmakevars2file,_paths.h.tmp) > +$(eval $(genpath-target)) > + > +_paths.h: genpath > + sed -e "s/\([^=]*\)=\(.*\)/#define \1 \2/g" $@.tmp >$@.2.tmp > + rm -f $@.tmp > + $(call move-if-changed,$@.2.tmp,$@) libxl has the exact same thing. Can we make it a common genpath-include-target or something please. I'm not sure why this isn't handled vi autoconf and tools/config.h.in. > + > +xc_private.h: _paths.h > + > .PHONY: all > all: build > > .PHONY: build > -build: > +build: xc_private.h This might be better as: $(CTRL_LIB_OBJS) $(XXX_OTHER_OBJS): xc_private.h > $(MAKE) libs > > .PHONY: libs > @@ -150,6 +160,7 @@ TAGS: > .PHONY: clean > clean: > rm -rf *.rpm $(LIB) *~ $(DEPS) \ > + _paths.h \ Whitespace oddity. Ian.