]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
tools: clean up handling of xen config and scripts directories.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 19 May 2009 00:48:18 +0000 (01:48 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 19 May 2009 00:48:18 +0000 (01:48 +0100)
For now hardcode /etc w/o a prefix as there are hardcoded
config paths in the code which would break otherwise.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
tools/Rules.mk
tools/examples/Makefile
tools/flask/policy/Makefile
tools/hotplug/Linux/Makefile
tools/hotplug/NetBSD/Makefile
tools/hotplug/common/Makefile
tools/include/xen-foreign/Makefile
tools/security/Makefile
tools/vnet/examples/Makefile

index 53434d51fc331ae6d14beef353948ac7e2f909e4..7718283544b7405776ddb32d27fa026da0dad20a 100644 (file)
@@ -8,6 +8,10 @@ include $(XEN_ROOT)/Config.mk
 export _INSTALL := $(INSTALL)
 INSTALL = $(XEN_ROOT)/tools/cross-install
 
+CONFIG_DIR = /etc
+XEN_CONFIG_DIR = $(CONFIG_DIR)/xen
+XEN_SCRIPT_DIR = $(XEN_CONFIG_DIR)/scripts
+
 XEN_INCLUDE        = $(XEN_ROOT)/tools/include
 XEN_XC             = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
 XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
index ecddb43e77e7d3e9783d47133483e1774e56e5ce..bb3a72c9ba1ae60fd5f36fd8b344dfa318a0efa5 100644 (file)
@@ -7,7 +7,6 @@ XENDOMAINS_INITD = init.d/xendomains
 XENDOMAINS_SYSCONFIG = init.d/sysconfig.xendomains
 
 # Xen configuration dir and configs to go there.
-XEN_CONFIG_DIR = /etc/xen
 XEN_READMES = README
 XEN_READMES += README.incompatibilities
 XEN_CONFIGS = xend-config.sxp
index 069b2321289838b992524a2bfb435e93f2efb525..df25dd8d4afa3180c46012034c2bbd87abd4301e 100644 (file)
@@ -86,7 +86,7 @@ TUNABLES := $(POLDIR)/tunables.conf
 BOOLEANS := $(POLDIR)/booleans.conf
 
 # install paths
-TOPDIR = $(DESTDIR)/etc/xen/
+TOPDIR = $(DESTDIR)$(XEN_CONFIG_DIR)
 INSTALLDIR = $(TOPDIR)/$(NAME)
 SRCPATH = $(INSTALLDIR)/src
 USERPATH = $(INSTALLDIR)/users
index c9edd0dc8e3f112dc5dc38f36057ac0c5176d0c4..5c83fe452696af5da9f21dd501aca5274e77edee 100644 (file)
@@ -6,11 +6,7 @@ XEND_INITD = init.d/xend
 XENDOMAINS_INITD = init.d/xendomains
 XENDOMAINS_SYSCONFIG = init.d/sysconfig.xendomains
 
-# Xen configuration dir and configs to go there.
-XEN_CONFIG_DIR = /etc/xen
-
 # Xen script dir and scripts to go there.
-XEN_SCRIPT_DIR = /etc/xen/scripts
 XEN_SCRIPTS = network-bridge vif-bridge
 XEN_SCRIPTS += network-route vif-route
 XEN_SCRIPTS += network-nat vif-nat
@@ -25,10 +21,10 @@ XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh
 XEN_SCRIPT_DATA += block-common.sh vtpm-common.sh vtpm-hotplug-common.sh
 XEN_SCRIPT_DATA += vtpm-migration.sh vtpm-impl
 
-XEN_HOTPLUG_DIR = /etc/hotplug
+XEN_HOTPLUG_DIR = $(CONFIG_DIR)/hotplug
 XEN_HOTPLUG_SCRIPTS = xen-backend.agent
 
-UDEV_RULES_DIR = /etc/udev
+UDEV_RULES_DIR = $(CONFIG_DIR)/udev
 UDEV_RULES = xen-backend.rules xend.rules
 
 DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),)
@@ -54,11 +50,11 @@ install: all install-initd install-scripts $(HOTPLUGS)
 
 .PHONY: install-initd
 install-initd:
-       [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
-       [ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
-       $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
-       $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
-       $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
+       [ -d $(DESTDIR)$(CONFIG_DIR)/init.d ] || $(INSTALL_DIR) $(DESTDIR)$(CONFIG_DIR)/init.d
+       [ -d $(DESTDIR)$(CONFIG_DIR)/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)$(CONFIG_DIR)/sysconfig
+       $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)$(CONFIG_DIR)/init.d
+       $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)$(CONFIG_DIR)/init.d
+       $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)$(CONFIG_DIR)/sysconfig/xendomains
 
 .PHONY: install-scripts
 install-scripts:
index 8577a6f2e56f6e64f65f75c97859c444b70d93d2..e4be3f9140e6a8fecdcebc68429e41869930a9a5 100644 (file)
@@ -1,11 +1,7 @@
 XEN_ROOT = ../../../
 include $(XEN_ROOT)/tools/Rules.mk
 
-# Xen configuration dir and configs to go there.
-XEN_CONFIG_DIR = /etc/xen
-
 # Xen script dir and scripts to go there.
-XEN_SCRIPT_DIR = $(XEN_CONFIG_DIR)/scripts
 XEN_SCRIPTS =
 XEN_SCRIPTS += block-nbsd
 XEN_SCRIPTS += qemu-ifup-nbsd
index b69b9991af07a489950db8cc210eb0d25173b4a2..a6e731c1cafd362e3e8687c2f7349209a595da19 100644 (file)
@@ -3,11 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 # OS-independent hotplug scripts go in this directory
 
-# Xen configuration dir and configs to go there.
-XEN_CONFIG_DIR = /etc/xen
-
 # Xen script dir and scripts to go there.
-XEN_SCRIPT_DIR = /etc/xen/scripts
 XEN_SCRIPTS =
 XEN_SCRIPT_DATA =
 
index 0b8ed920ebadda2c2d248a0b789fc7c74ac73d5b..8683b05974366ad3523c0238be1a8152520aedc5 100644 (file)
@@ -1,5 +1,5 @@
 XEN_ROOT=../../..
-include $(XEN_ROOT)/Config.mk
+include $(XEN_ROOT)/tools/Rules.mk
 
 ROOT = $(XEN_ROOT)/xen/include/public
 
index f8eb69c6b3404d452161ffbfb92cc6eb2e3e12bc..5e43d4365bd5ca6e19d5b0b5fb046471550c9470 100644 (file)
@@ -21,7 +21,7 @@ ACM_EZPOLICY      = xensec_ezpolicy
 ACM_OBJS          = $(OBJS_TOOL) $(OBJS_GETD)
 ACM_SCRIPTS       = python/xensec_tools/acm_getlabel
 
-ACM_CONFIG_DIR    = /etc/xen/acm-security
+ACM_CONFIG_DIR    = $(XEN_CONFIG_DIR)/acm-security
 ACM_POLICY_DIR    = $(ACM_CONFIG_DIR)/policies
 ACM_SCRIPT_DIR    = $(ACM_CONFIG_DIR)/scripts
 
index c3aab0c70e28ef7ac9cf049ddf0fc1bab577c364..84d3f1e09330beadeda5340b11a5cabec5ad2e6b 100644 (file)
@@ -3,8 +3,6 @@
 XEN_ROOT        = ../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-XEN_SCRIPT_DIR  = $(DESTDIR)/etc/xen/scripts
-
 .PHONY: all
 all: