tools: substitute bindir instead of BINDIR
authorOlaf Hering <olaf@aepfle.de>
Wed, 1 Oct 2014 16:41:13 +0000 (18:41 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 6 Oct 2014 14:54:49 +0000 (15:54 +0100)
... and same for sbindir and libdir.
Expand usage of exec_prefix so that it does not appear in substituted
variables in systemd files.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Akced-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
[ ijc -- ran autogen.sh as requested ]

config/Paths.mk.in
configure
m4/paths.m4
m4/xenstored.m4
tools/configure
tools/hotplug/Linux/init.d/sysconfig.xencommons.in
tools/hotplug/Linux/systemd/xen-watchdog.service.in
tools/hotplug/Linux/systemd/xenconsoled.service.in
tools/hotplug/Linux/systemd/xenstored.service.in

index 65ca37b1b33f855c6d87e9018d7cf7040c236f9d..c3c9897b51d6916658f9530875a11fff040c47df 100644 (file)
@@ -29,12 +29,12 @@ includedir               := @includedir@
 localstatedir            := @localstatedir@
 sysconfdir               := @sysconfdir@
 
-SBINDIR                  := @SBINDIR@
-BINDIR                   := @BINDIR@
+SBINDIR                  := $(sbindir)
+BINDIR                   := $(bindir)
 LIBEXEC                  := @LIBEXEC@
 
 SHAREDIR                 := @SHAREDIR@
-LIBDIR                   := @LIBDIR@
+LIBDIR                   := $(libdir)
 
 XEN_RUN_DIR              := @XEN_RUN_DIR@
 XEN_LOG_DIR              := @XEN_LOG_DIR@
index 6b01c35013f0a60bb025a0774789e8a4e7eab8c3..d24d1636b4d813ef672a301a57010657e5a22c04 100755 (executable)
--- a/configure
+++ b/configure
@@ -607,10 +607,7 @@ SHAREDIR
 XEN_LIB_STORED
 XEN_LOG_DIR
 XEN_RUN_DIR
-LIBDIR
 LIBEXEC
-SBINDIR
-BINDIR
 host_os
 host_vendor
 host_cpu
@@ -1858,6 +1855,9 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
 test "x$exec_prefix" = "xNONE" && exec_prefix=${prefix}
+bindir=`eval echo $bindir`
+sbindir=`eval echo $sbindir`
+libdir=`eval echo $libdir`
 
 if test "x$sysconfdir" = 'x${prefix}/etc' ; then
     case "$host_os" in
@@ -1897,21 +1897,12 @@ else
 fi
 
 
-BINDIR=$prefix/bin
-
-
-SBINDIR=$prefix/sbin
-
-
 case "$host_os" in
 *netbsd*)  LIBEXEC=$prefix/libexec ;;
 *) LIBEXEC=$prefix/lib/xen/bin ;;
 esac
 
 
-LIBDIR=`eval echo $libdir`
-
-
 XEN_RUN_DIR=/var/run/xen
 
 
@@ -1924,7 +1915,7 @@ XEN_LIB_STORED=/var/lib/xenstored
 SHAREDIR=$prefix/share
 
 
-PRIVATE_PREFIX=$LIBDIR/xen
+PRIVATE_PREFIX=`eval echo $libdir`
 
 
 case "$host_os" in
index 178b9a993a19e3ea820c8aedc07d383d2e1f2888..a9c6ebd23b774f7418aebf191edfd472aff2f474 100644 (file)
@@ -2,6 +2,10 @@ AC_DEFUN([AX_XEN_EXPAND_CONFIG], [
 dnl expand these early so we can use this for substitutions
 test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
 test "x$exec_prefix" = "xNONE" && exec_prefix=${prefix}
+dnl expand exec_prefix or it will endup in substituted variables
+bindir=`eval echo $bindir`
+sbindir=`eval echo $sbindir`
+libdir=`eval echo $libdir`
 
 dnl
 if test "x$sysconfdir" = 'x${prefix}/etc' ; then
@@ -39,12 +43,6 @@ AC_ARG_WITH([initddir],
          ;;
      esac])
 
-BINDIR=$prefix/bin
-AC_SUBST(BINDIR)
-
-SBINDIR=$prefix/sbin
-AC_SUBST(SBINDIR)
-
 dnl XXX: this should be changed to use the passed $libexec
 dnl but can be done as a second step
 case "$host_os" in
@@ -53,9 +51,6 @@ case "$host_os" in
 esac
 AC_SUBST(LIBEXEC)
 
-LIBDIR=`eval echo $libdir`
-AC_SUBST(LIBDIR)
-
 XEN_RUN_DIR=/var/run/xen
 AC_SUBST(XEN_RUN_DIR)
 
@@ -68,7 +63,7 @@ AC_SUBST(XEN_LIB_STORED)
 SHAREDIR=$prefix/share
 AC_SUBST(SHAREDIR)
 
-PRIVATE_PREFIX=$LIBDIR/xen
+PRIVATE_PREFIX=`eval echo $libdir`
 AC_SUBST(PRIVATE_PREFIX)
 
 case "$host_os" in
index 30b44c9757e8ff31e42f58c0154b08a28d9dc644..b268fc2b61ee3b41d9e0b4f44af941c32527febd 100644 (file)
@@ -6,10 +6,10 @@ AC_DEFUN([AX_XEN_OCAML_XENSTORE_CHECK], [
 
 AC_DEFUN([AX_XEN_OCAML_XENSTORE_DEFAULTS], [
        xenstore="oxenstored"
-       xenstored=$SBINDIR/oxenstored
+       xenstored=$sbindir/oxenstored
        AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [
                xenstore="xenstored"
-               xenstored=$SBINDIR/xenstored
+               xenstored=$sbindir/xenstored
        ])
 ])
 
@@ -29,11 +29,11 @@ AC_ARG_WITH([xenstored],
        [
                AS_IF([test "x$withval" = "xxenstored"], [
                        xenstore=$withval
-                       xenstored=$SBINDIR/xenstored
+                       xenstored=$sbindir/xenstored
                ])
                AS_IF([test "x$withval" = "xoxenstored"], [
                        xenstore=$withval
-                       xenstored=$SBINDIR/oxenstored
+                       xenstored=$sbindir/oxenstored
                        AX_XEN_OCAML_XENSTORE_CHECK()
                ])
                AS_IF([test "x$withval" != "xoxenstored" && test "x$withval" != "xxenstored"], [
index 509d5ef1d76128e6e8fce5b28929a0962ede3889..f18a579de8e2b40858ccb35eafb30e00019edb39 100755 (executable)
@@ -720,10 +720,7 @@ SHAREDIR
 XEN_LIB_STORED
 XEN_LOG_DIR
 XEN_RUN_DIR
-LIBDIR
 LIBEXEC
-SBINDIR
-BINDIR
 FILE_OFFSET_BITS
 OBJEXT
 EXEEXT
@@ -3693,6 +3690,9 @@ esac
 
 test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
 test "x$exec_prefix" = "xNONE" && exec_prefix=${prefix}
+bindir=`eval echo $bindir`
+sbindir=`eval echo $sbindir`
+libdir=`eval echo $libdir`
 
 if test "x$sysconfdir" = 'x${prefix}/etc' ; then
     case "$host_os" in
@@ -3732,21 +3732,12 @@ else
 fi
 
 
-BINDIR=$prefix/bin
-
-
-SBINDIR=$prefix/sbin
-
-
 case "$host_os" in
 *netbsd*)  LIBEXEC=$prefix/libexec ;;
 *) LIBEXEC=$prefix/lib/xen/bin ;;
 esac
 
 
-LIBDIR=`eval echo $libdir`
-
-
 XEN_RUN_DIR=/var/run/xen
 
 
@@ -3759,7 +3750,7 @@ XEN_LIB_STORED=/var/lib/xenstored
 SHAREDIR=$prefix/share
 
 
-PRIVATE_PREFIX=$LIBDIR/xen
+PRIVATE_PREFIX=`eval echo $libdir`
 
 
 case "$host_os" in
@@ -6076,13 +6067,13 @@ if test "${with_xenstored+set}" = set; then :
                if test "x$withval" = "xxenstored"; then :
 
                        xenstore=$withval
-                       xenstored=$SBINDIR/xenstored
+                       xenstored=$sbindir/xenstored
 
 fi
                if test "x$withval" = "xoxenstored"; then :
 
                        xenstore=$withval
-                       xenstored=$SBINDIR/oxenstored
+                       xenstored=$sbindir/oxenstored
 
        if test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"; then :
 
@@ -6102,11 +6093,11 @@ else
 
 
        xenstore="oxenstored"
-       xenstored=$SBINDIR/oxenstored
+       xenstored=$sbindir/oxenstored
        if test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"; then :
 
                xenstore="xenstored"
-               xenstored=$SBINDIR/xenstored
+               xenstored=$sbindir/xenstored
 
 fi
 
index d423ff8b996a6e817041ecde81a4ba075d34f6d4..4d76d6b99ed738574ed30a97ef7b13e671363034 100644 (file)
@@ -14,8 +14,8 @@
 # the XENSTORED variable there.
 #
 # This can be either of:
-#  * @SBINDIR@/oxenstored
-#  * @SBINDIR@/xenstored
+#  * @sbindir@/oxenstored
+#  * @sbindir@/xenstored
 #
 # Changing this requires a reboot to take effect.
 #XENSTORED=@XENSTORED@
index acb2b775a6998b7cf20d8faed97581601a6013f2..ee77bf97ae02327849ef105c038431dfa3f86e97 100644 (file)
@@ -6,7 +6,7 @@ ConditionVirtualization=xen
 
 [Service]
 Type=forking
-ExecStart=@SBINDIR@/xenwatchdogd 30 15
+ExecStart=@sbindir@/xenwatchdogd 30 15
 KillSignal=USR1
 
 [Install]
index 15fad3504f67426a69d36e9d6aabb3df8aea4a0e..7ca026469040f8914769bd465c576bc237fd96d5 100644 (file)
@@ -14,7 +14,7 @@ EnvironmentFile=-/etc/sysconfig/xenconsoled
 PIDFile=@XEN_RUN_DIR@/xenconsoled.pid
 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
 ExecStartPre=/bin/mkdir -p ${XENCONSOLED_LOG_DIR}
-ExecStart=@SBINDIR@/xenconsoled --pid-file @XEN_RUN_DIR@/xenconsoled.pid --log=${XENCONSOLED_LOG} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS
+ExecStart=@sbindir@/xenconsoled --pid-file @XEN_RUN_DIR@/xenconsoled.pid --log=${XENCONSOLED_LOG} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS
 
 [Install]
 WantedBy=multi-user.target
index 4a9fcee0092055b1421882e417962b2e80317709..013e69e7926b936dd5b43b143fe0cbff2451bcc0 100644 (file)
@@ -17,8 +17,8 @@ ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
 ExecStartPre=-/bin/rm -f @XEN_LIB_STORED@/tdb*
 ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@
 ExecStart=/bin/sh -c "exec $XENSTORED --no-fork $XENSTORED_ARGS"
-ExecStartPost=-@BINDIR@/xenstore-write "/local/domain/0/name" "Domain-0"
-ExecStartPost=-@BINDIR@/xenstore-write "/local/domain/0/domid" 0
+ExecStartPost=-@bindir@/xenstore-write "/local/domain/0/name" "Domain-0"
+ExecStartPost=-@bindir@/xenstore-write "/local/domain/0/domid" 0
 
 [Install]
 WantedBy=multi-user.target