From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, wei.liu2@citrix.com, xen-devel@lists.xen.org
Cc: Ian Campbell <ian.campbell@citrix.com>, 805508@bugs.debian.org
Subject: [PATCH] tools: allow configure time choice of libexec subdirectory.
Date: Wed, 16 Dec 2015 15:06:35 +0000 [thread overview]
Message-ID: <1450278395-23639-1-git-send-email-ian.campbell@citrix.com> (raw)
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@citrix.com>
Cc: 805508@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
next reply other threads:[~2015-12-16 15:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-16 15:06 Ian Campbell [this message]
2015-12-16 15:33 ` [PATCH] tools: allow configure time choice of libexec subdirectory Ian Campbell
[not found] ` <1450280017.4053.61.camel@citrix.com>
2015-12-18 19:55 ` Doug Goldstein
2016-01-04 17:00 ` Ian Jackson
2016-01-05 14:52 ` 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=1450278395-23639-1-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=805508@bugs.debian.org \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--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).