mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Add configure --with-sysconfig-leaf-dir=SUBDIR to set CONFIG_LEAF_DIR
Set CONFIG_LEAF_DIR with configure to give control if needed. The check for the correct value if the option is not specified is tricky. Since other packages (such as grub2) started to populate also /etc/default/ a given system may have both directories. Use "default" only if /etc/sysconfig does not exist. "sysconfig" remains the default. Move the variable from StdGNU.mk to Linux.mk because thats the only place where it is used. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-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 ]
This commit is contained in:
1 parent
afc973e480
commit
9ead9afcb9
8 files changed
+54
-7
No files matched your search
@@ -69,9 +69,6 @@ define setvar_dir
|
|||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# See distro_mapping.txt for other options
|
|
||||||
$(eval $(call setvar_dir,CONFIG_LEAF_DIR,,/etc/sysconfig,sysconfig,default))
|
|
||||||
|
|
||||||
ifneq ($(EXTRA_PREFIX),)
|
ifneq ($(EXTRA_PREFIX),)
|
||||||
EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
|
EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
|
||||||
EXTRA_LIB += $(EXTRA_PREFIX)/lib
|
EXTRA_LIB += $(EXTRA_PREFIX)/lib
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
include $(XEN_ROOT)/config/StdGNU.mk
|
include $(XEN_ROOT)/config/StdGNU.mk
|
||||||
|
|
||||||
|
SYSCONFIG_DIR = $(CONFIG_DIR)/$(CONFIG_LEAF_DIR)
|
||||||
@@ -50,6 +50,7 @@ XEN_LIB_STORED := @XEN_LIB_STORED@
|
|||||||
|
|
||||||
CONFIG_DIR := @CONFIG_DIR@
|
CONFIG_DIR := @CONFIG_DIR@
|
||||||
INITD_DIR := @INITD_DIR@
|
INITD_DIR := @INITD_DIR@
|
||||||
|
CONFIG_LEAF_DIR := @CONFIG_LEAF_DIR@
|
||||||
BASH_COMPLETION_DIR := $(CONFIG_DIR)/bash_completion.d
|
BASH_COMPLETION_DIR := $(CONFIG_DIR)/bash_completion.d
|
||||||
XEN_LOCK_DIR := @XEN_LOCK_DIR@
|
XEN_LOCK_DIR := @XEN_LOCK_DIR@
|
||||||
XEN_PAGING_DIR := @XEN_PAGING_DIR@
|
XEN_PAGING_DIR := @XEN_PAGING_DIR@
|
||||||
|
|||||||
@@ -27,8 +27,6 @@ INSTALL_DIR = $(INSTALL) -d -m0755 -p
|
|||||||
INSTALL_DATA = $(INSTALL) -m0644 -p
|
INSTALL_DATA = $(INSTALL) -m0644 -p
|
||||||
INSTALL_PROG = $(INSTALL) -m0755 -p
|
INSTALL_PROG = $(INSTALL) -m0755 -p
|
||||||
|
|
||||||
SYSCONFIG_DIR = $(CONFIG_DIR)/$(CONFIG_LEAF_DIR)
|
|
||||||
|
|
||||||
BOOT_DIR ?= /boot
|
BOOT_DIR ?= /boot
|
||||||
|
|
||||||
SOCKET_LIBS =
|
SOCKET_LIBS =
|
||||||
|
|||||||
@@ -606,6 +606,7 @@ XEN_LIB_STORED
|
|||||||
XEN_LOG_DIR
|
XEN_LOG_DIR
|
||||||
XEN_RUN_DIR
|
XEN_RUN_DIR
|
||||||
LIBEXEC_BIN
|
LIBEXEC_BIN
|
||||||
|
CONFIG_LEAF_DIR
|
||||||
host_os
|
host_os
|
||||||
host_vendor
|
host_vendor
|
||||||
host_cpu
|
host_cpu
|
||||||
@@ -656,6 +657,7 @@ ac_subst_files=''
|
|||||||
ac_user_opts='
|
ac_user_opts='
|
||||||
enable_option_checking
|
enable_option_checking
|
||||||
with_initddir
|
with_initddir
|
||||||
|
with_sysconfig_leaf_dir
|
||||||
enable_xen
|
enable_xen
|
||||||
enable_tools
|
enable_tools
|
||||||
enable_stubdom
|
enable_stubdom
|
||||||
@@ -1290,6 +1292,11 @@ Optional Packages:
|
|||||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||||
--with-initddir=DIR Path to directory with sysv runlevel scripts.
|
--with-initddir=DIR Path to directory with sysv runlevel scripts.
|
||||||
[SYSCONFDIR/init.d]
|
[SYSCONFDIR/init.d]
|
||||||
|
--with-sysconfig-leaf-dir=SUBDIR
|
||||||
|
Name of subdirectory in /etc to store runtime
|
||||||
|
options for runlevel scripts and daemons such as
|
||||||
|
xenstoerd. This should be either "sysconfig" or
|
||||||
|
"default". [sysconfig]
|
||||||
|
|
||||||
Report bugs to <xen-devel@lists.xen.org>.
|
Report bugs to <xen-devel@lists.xen.org>.
|
||||||
Xen Hypervisor home page: <http://www.xen.org/>.
|
Xen Hypervisor home page: <http://www.xen.org/>.
|
||||||
@@ -1900,6 +1907,18 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --with-sysconfig-leaf-dir was given.
|
||||||
|
if test "${with_sysconfig_leaf_dir+set}" = set; then :
|
||||||
|
withval=$with_sysconfig_leaf_dir; config_leaf_dir=$withval
|
||||||
|
else
|
||||||
|
config_leaf_dir=sysconfig
|
||||||
|
if test ! -d /etc/sysconfig ; then config_leaf_dir=default ; fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
CONFIG_LEAF_DIR=$config_leaf_dir
|
||||||
|
|
||||||
|
|
||||||
if test "$libexecdir" = '${exec_prefix}/libexec' ; then
|
if test "$libexecdir" = '${exec_prefix}/libexec' ; then
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
*netbsd*) ;;
|
*netbsd*) ;;
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ scripts at run-time. If the Red Hat directory exists, it is used;
|
|||||||
otherwise the Debian one is used.
|
otherwise the Debian one is used.
|
||||||
|
|
||||||
The INITD_DIR path can be changed with configure --with-initddir=DIR.
|
The INITD_DIR path can be changed with configure --with-initddir=DIR.
|
||||||
The CONFIG_LEAF_DIR path can be changed by setting the variables in
|
The CONFIG_LEAF_DIR name can be changed with configure
|
||||||
the environment or your ".config" (which is included by Config.mk).
|
--with-sysconfig-leaf-dir=SUBDIR.
|
||||||
|
|
||||||
To add support for new distributions that don't use the above locations,
|
To add support for new distributions that don't use the above locations,
|
||||||
one must grep for the above elements and add appropriate checks.
|
one must grep for the above elements and add appropriate checks.
|
||||||
|
|||||||
+11
@@ -51,6 +51,17 @@ AC_ARG_WITH([initddir],
|
|||||||
;;
|
;;
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
|
AC_ARG_WITH([sysconfig-leaf-dir],
|
||||||
|
AS_HELP_STRING([--with-sysconfig-leaf-dir=SUBDIR],
|
||||||
|
[Name of subdirectory in /etc to store runtime options for runlevel
|
||||||
|
scripts and daemons such as xenstoerd.
|
||||||
|
This should be either "sysconfig" or "default". [sysconfig]]),
|
||||||
|
[config_leaf_dir=$withval],
|
||||||
|
[config_leaf_dir=sysconfig
|
||||||
|
if test ! -d /etc/sysconfig ; then config_leaf_dir=default ; fi])
|
||||||
|
CONFIG_LEAF_DIR=$config_leaf_dir
|
||||||
|
AC_SUBST(CONFIG_LEAF_DIR)
|
||||||
|
|
||||||
if test "$libexecdir" = '${exec_prefix}/libexec' ; then
|
if test "$libexecdir" = '${exec_prefix}/libexec' ; then
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
*netbsd*) ;;
|
*netbsd*) ;;
|
||||||
|
|||||||
Vendored
+19
@@ -721,6 +721,7 @@ XEN_LIB_STORED
|
|||||||
XEN_LOG_DIR
|
XEN_LOG_DIR
|
||||||
XEN_RUN_DIR
|
XEN_RUN_DIR
|
||||||
LIBEXEC_BIN
|
LIBEXEC_BIN
|
||||||
|
CONFIG_LEAF_DIR
|
||||||
FILE_OFFSET_BITS
|
FILE_OFFSET_BITS
|
||||||
OBJEXT
|
OBJEXT
|
||||||
EXEEXT
|
EXEEXT
|
||||||
@@ -781,6 +782,7 @@ ac_user_opts='
|
|||||||
enable_option_checking
|
enable_option_checking
|
||||||
enable_largefile
|
enable_largefile
|
||||||
with_initddir
|
with_initddir
|
||||||
|
with_sysconfig_leaf_dir
|
||||||
enable_rpath
|
enable_rpath
|
||||||
enable_githttp
|
enable_githttp
|
||||||
enable_monitors
|
enable_monitors
|
||||||
@@ -1476,6 +1478,11 @@ Optional Packages:
|
|||||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||||
--with-initddir=DIR Path to directory with sysv runlevel scripts.
|
--with-initddir=DIR Path to directory with sysv runlevel scripts.
|
||||||
[SYSCONFDIR/init.d]
|
[SYSCONFDIR/init.d]
|
||||||
|
--with-sysconfig-leaf-dir=SUBDIR
|
||||||
|
Name of subdirectory in /etc to store runtime
|
||||||
|
options for runlevel scripts and daemons such as
|
||||||
|
xenstoerd. This should be either "sysconfig" or
|
||||||
|
"default". [sysconfig]
|
||||||
--with-linux-backend-modules="mod1 mod2"
|
--with-linux-backend-modules="mod1 mod2"
|
||||||
List of Linux backend module or modalias names to be
|
List of Linux backend module or modalias names to be
|
||||||
autoloaded on startup.
|
autoloaded on startup.
|
||||||
@@ -3744,6 +3751,18 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --with-sysconfig-leaf-dir was given.
|
||||||
|
if test "${with_sysconfig_leaf_dir+set}" = set; then :
|
||||||
|
withval=$with_sysconfig_leaf_dir; config_leaf_dir=$withval
|
||||||
|
else
|
||||||
|
config_leaf_dir=sysconfig
|
||||||
|
if test ! -d /etc/sysconfig ; then config_leaf_dir=default ; fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
CONFIG_LEAF_DIR=$config_leaf_dir
|
||||||
|
|
||||||
|
|
||||||
if test "$libexecdir" = '${exec_prefix}/libexec' ; then
|
if test "$libexecdir" = '${exec_prefix}/libexec' ; then
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
*netbsd*) ;;
|
*netbsd*) ;;
|
||||||
|
|||||||