Ian Campbell
2015-Dec-16 15:06 UTC
[Pkg-xen-devel] Bug#805508: [PATCH] tools: allow configure time choice of libexec subdirectory.
Currently we hardcode various paths such as $libexec/xen/{bin,boot}, however some downstreams (notably Debian) would like instead to install things into $libexec/xen-X.Y/{bin,boot} as part of allowing multiple versions of the tools packages to be installed. Since this currently involves patching configure its a bit fiddly, provide a configure option for the leaf dir instead, name it --with-libexec-leaf-dir similar to the existing --with-sysconfig-leaf-dir. Rather than have the determination of the full path in both configure and config/Paths.mk.in move it into configure only. Also for consistency move the other LIBEXEC_* to configure, even though they are only substituted into Paths.mk. Please rerun autogen.sh when applying. Signed-off-by: Ian Campbell <ian.campbell at citrix.com> Cc: 805508 at bugs.debian.org --- config/Paths.mk.in | 6 +++--- m4/paths.m4 | 24 ++++++++++++++++++------ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/config/Paths.mk.in b/config/Paths.mk.in index d36504f..1c7afb4 100644 --- a/config/Paths.mk.in +++ b/config/Paths.mk.in @@ -29,10 +29,10 @@ includedir := @includedir@ localstatedir := @localstatedir@ sysconfdir := @sysconfdir@ -LIBEXEC := $(libexecdir)/$(PACKAGE_TARNAME) +LIBEXEC := @LIBEXEC@ LIBEXEC_BIN := @LIBEXEC_BIN@ -LIBEXEC_LIB := $(LIBEXEC)/lib -LIBEXEC_INC := $(LIBEXEC)/include +LIBEXEC_LIB := @LIBEXEC_LIB@ +LIBEXEC_INC := @LIBEXEC_INC@ SHAREDIR := @SHAREDIR@ MAN1DIR := $(mandir)/man1 diff --git a/m4/paths.m4 b/m4/paths.m4 index 63e0f6b..1a558e1 100644 --- a/m4/paths.m4 +++ b/m4/paths.m4 @@ -62,6 +62,14 @@ AC_ARG_WITH([sysconfig-leaf-dir], CONFIG_LEAF_DIR=$config_leaf_dir AC_SUBST(CONFIG_LEAF_DIR) +dnl autoconf docs suggest to use a "package name" subdir. We make it +dnl configurable for the benefit of those who want e.g. xen-X.Y instead. +AC_ARG_WITH([libexec-leaf-dir], + AS_HELP_STRING([--with-libexec-leaf-dir=SUBDIR], + [Name of subdirectory in libexecdir to use.]), + [libexec_subdir=$withval], + [libexec_subdir=$PACKAGE_TARNAME]) + AC_ARG_WITH([xen-dumpdir], AS_HELP_STRING([--with-xen-dumpdir=DIR], [Path to directory for domU crash dumps. [LOCALSTATEDIR/lib/xen/dump]]), @@ -77,13 +85,17 @@ if test "$libexecdir" = '${exec_prefix}/libexec' ; then esac fi dnl expand exec_prefix or it will endup in substituted variables -libexecdir=`eval echo $libexecdir` -dnl autoconf doc suggest to use a "package name" subdir -dnl This variable will be substituted in various .in files -LIBEXEC_BIN=`eval echo $libexecdir/$PACKAGE_TARNAME/bin` -AC_SUBST(LIBEXEC_BIN) +LIBEXEC=`eval echo $libexecdir/$libexec_subdir` +AC_SUBST(LIBEXEC) -XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot` +dnl These variables will be substituted in various .in files +LIBEXEC_BIN=${LIBEXEC}/bin +AC_SUBST(LIBEXEC_BIN) +LIBEXEC_LIB=${LIBEXEC}/lib +AC_SUBST(LIBEXEC_LIB) +LIBEXEC_INC=${LIBEXEC}/include +AC_SUBST(LIBEXEC_INC) +XENFIRMWAREDIR=${LIBEXEC}/boot` AC_SUBST(XENFIRMWAREDIR) XEN_RUN_DIR=$localstatedir/run/xen -- 2.1.4
Ian Campbell
2015-Dec-16 15:33 UTC
[Pkg-xen-devel] Bug#805508: [PATCH] tools: allow configure time choice of libexec subdirectory.
On Wed, 2015-12-16 at 15:06 +0000, Ian Campbell wrote:> -XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot` > +dnl These variables will be substituted in various .in files > +LIBEXEC_BIN=${LIBEXEC}/bin > +AC_SUBST(LIBEXEC_BIN) > +LIBEXEC_LIB=${LIBEXEC}/lib > +AC_SUBST(LIBEXEC_LIB) > +LIBEXEC_INC=${LIBEXEC}/include > +AC_SUBST(LIBEXEC_INC) > +XENFIRMWAREDIR=${LIBEXEC}/boot`I somehow slipped a stray ` in there and didn't notice, sorry. Ian.
Ian Jackson
2016-Jan-04 17:00 UTC
[Pkg-xen-devel] Bug#805508: [PATCH] tools: allow configure time choice of libexec subdirectory.
Ian Campbell writes ("Re: [PATCH] tools: allow configure time choice of libexec subdirectory."):> I somehow slipped a stray ` in there and didn't notice, sorry.This looks like a reasonable change aside from that but we should definitely do some build tests at commit time. With the stray ` removed: Acked-by: Ian Jackson <ian.jackson at eu.citrix.com> Ian.
Possibly Parallel Threads
- Bug#805508: [PATCH] tools: allow configure time choice of libexec subdirectory.
- Bug#805508: [PATCH] tools: allow configure time choice of libexec subdirectory.
- [xen-4.1-testing test] 10458: trouble: broken/fail/pass
- [PATCH RESEND] libxl: Do not generate short block in libxl__datacopier_prefixdata
- [PATCH] Fix ocaml build in 4.1; problem with 4.1.6 release