Use configure --libexecdir=BASEDIR to set LIBEXEC

The current usage of LIBEXEC is bogus. It describes the directory for
private xen executables. Other places create their own, similar
libexecdir path as $prefix/lib/xen/*.

Additional two other variables are used to describe similar paths:
PRIVATE_BINDIR and PRIVATE_PREFIX

The autoconf documentation refers to libexec as a directory for
executables and stuff which is called by other programs, not by the
user.

Adjust all places that want libexecdir as a target path. LIBEXEC refers
now to the base directory. Three convenience variables are used to refer
to paths to private binaries, libs and include files.

In the systemd files LIBEXEC_BIN is substituted, so this variable has to
be present in autoconf. All other variables are expanded in Paths.mk
because they are only used in Makefiles.

Most users of LIBEXEC are updated to use LIBEXEC_BIN because that is
what they want.

Users of PRIVATE_BINDIR are updated to use LIBEXEC_BIN because that is
what they want. PRIVATE_BINDIR and PRIVATE_PREFIX usage is removed by
this patch, in favour of LIBXEC_BIN and LIBEXEC

An internal libxl function was removed. A single helper to retrieve
LIBEXEC_BIN remains.

As suggested by the autoconf documentation, configure appends the
package name to LIBEXEC to make sure the provided directory really
refers to xen. This makes sure "make uninstall" preserves the real
libexecdir.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
[ ijc -- ran autogen.sh as requested, updated QEMU_TRADITIONAL_REVISION to
         pickup version which uses LIBEXEC_BIN ]
This commit is contained in:
Olaf Hering authored and Ian Campbell committed 2014-10-06 16:59:56 +01:00
1 parent c66aa6c145
commit 2c96ecb1a4
32 files changed
+98 -120

No files matched your search

+14 -17
View File
@@ -43,13 +43,20 @@ AC_ARG_WITH([initddir],
;;
esac])
dnl XXX: this should be changed to use the passed $libexec
dnl but can be done as a second step
case "$host_os" in
*netbsd*) LIBEXEC=$prefix/libexec ;;
*) LIBEXEC=$prefix/lib/xen/bin ;;
esac
AC_SUBST(LIBEXEC)
if test "$libexecdir" = '${exec_prefix}/libexec' ; then
case "$host_os" in
*netbsd*) ;;
*)
libexecdir='${exec_prefix}/lib'
;;
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)
XEN_RUN_DIR=/var/run/xen
AC_SUBST(XEN_RUN_DIR)
@@ -63,16 +70,6 @@ AC_SUBST(XEN_LIB_STORED)
SHAREDIR=$prefix/share
AC_SUBST(SHAREDIR)
PRIVATE_PREFIX=`eval echo $libdir`
AC_SUBST(PRIVATE_PREFIX)
case "$host_os" in
*freebsd*) PRIVATE_BINDIR=$PRIVATE_PREFIX/bin ;;
*netbsd*) PRIVATE_BINDIR=$BINDIR ;;
*) PRIVATE_BINDIR=$PRIVATE_PREFIX/bin ;;
esac
AC_SUBST(PRIVATE_BINDIR)
XENFIRMWAREDIR=$prefix/lib/xen/boot
AC_SUBST(XENFIRMWAREDIR)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.