xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools: allow configure time choice of libexec subdirectory.
@ 2015-12-16 15:06 Ian Campbell
  2015-12-16 15:33 ` Ian Campbell
       [not found] ` <1450280017.4053.61.camel@citrix.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Ian Campbell @ 2015-12-16 15:06 UTC (permalink / raw)
  To: ian.jackson, wei.liu2, xen-devel; +Cc: Ian Campbell, 805508

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] tools: allow configure time choice of libexec subdirectory.
  2015-12-16 15:06 [PATCH] tools: allow configure time choice of libexec subdirectory Ian Campbell
@ 2015-12-16 15:33 ` Ian Campbell
       [not found] ` <1450280017.4053.61.camel@citrix.com>
  1 sibling, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2015-12-16 15:33 UTC (permalink / raw)
  To: ian.jackson, wei.liu2, xen-devel; +Cc: 805508

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tools: allow configure time choice of libexec subdirectory.
       [not found] ` <1450280017.4053.61.camel@citrix.com>
@ 2015-12-18 19:55   ` Doug Goldstein
  2016-01-04 17:00   ` Ian Jackson
  1 sibling, 0 replies; 5+ messages in thread
From: Doug Goldstein @ 2015-12-18 19:55 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 643 bytes --]

On 12/16/15 9:33 AM, Ian Campbell wrote:
> 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.
> 

Squashing in the above fix:

Reviewed-by: Doug Goldstein <cardoe@cardoe.com>

-- 
Doug Goldstein


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tools: allow configure time choice of libexec subdirectory.
       [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
  1 sibling, 1 reply; 5+ messages in thread
From: Ian Jackson @ 2016-01-04 17:00 UTC (permalink / raw)
  To: Ian Campbell; +Cc: wei.liu2, 805508, xen-devel

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@eu.citrix.com>

Ian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tools: allow configure time choice of libexec subdirectory.
  2016-01-04 17:00   ` Ian Jackson
@ 2016-01-05 14:52     ` Ian Campbell
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2016-01-05 14:52 UTC (permalink / raw)
  To: Ian Jackson; +Cc: wei.liu2, 805508, xen-devel

On Mon, 2016-01-04 at 17:00 +0000, Ian Jackson wrote:
> 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.

Right, my pre-push scripting involves a build on all architectures and a
diff of the lists of installed files, I think that would have caught any
remaining issues (and didn't).

> With the stray ` removed:
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Applied, thanks (and to Doug).

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-05 14:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-16 15:06 [PATCH] tools: allow configure time choice of libexec subdirectory Ian Campbell
2015-12-16 15:33 ` 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

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).