ia64/xen-unstable

view tools/examples/Makefile @ 10098:48c0f5489d44

Remove Emacs variables settings from tail of our Linux files.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu May 18 11:39:03 2006 +0100 (2006-05-18)
parents 6af7b456e684
children 8589cdd09636
line source
1 XEN_ROOT = ../../
2 include $(XEN_ROOT)/tools/Rules.mk
4 INSTALL = install
5 INSTALL_DIR = $(INSTALL) -d -m0755
6 INSTALL_PROG = $(INSTALL) -m0755
7 INSTALL_DATA = $(INSTALL) -m0644
9 # Init scripts.
10 XEND_INITD = init.d/xend
11 XENDOMAINS_INITD = init.d/xendomains
12 XENDOMAINS_SYSCONFIG = init.d/sysconfig.xendomains
14 # Xen configuration dir and configs to go there.
15 XEN_CONFIG_DIR = /etc/xen
16 XEN_CONFIGS = xend-config.sxp
17 XEN_CONFIGS += xmexample1
18 XEN_CONFIGS += xmexample2
19 XEN_CONFIGS += xmexample.hvm
20 XEN_CONFIGS += xmexample.vti
22 # Xen script dir and scripts to go there.
23 XEN_SCRIPT_DIR = /etc/xen/scripts
24 XEN_SCRIPTS = network-bridge vif-bridge
25 XEN_SCRIPTS += network-route vif-route
26 XEN_SCRIPTS += network-nat vif-nat
27 XEN_SCRIPTS += block
28 XEN_SCRIPTS += block-enbd block-nbd
29 XEN_SCRIPTS += vtpm vtpm-delete
30 XEN_SCRIPTS += xen-hotplug-cleanup
31 XEN_SCRIPTS += external-device-migrate
32 XEN_SCRIPT_DATA = xen-script-common.sh locking.sh logging.sh
33 XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh
34 XEN_SCRIPT_DATA += block-common.sh vtpm-common.sh vtpm-hotplug-common.sh
35 XEN_SCRIPT_DATA += vtpm-migration.sh
37 XEN_HOTPLUG_DIR = /etc/hotplug
38 XEN_HOTPLUG_SCRIPTS = xen-backend.agent
40 UDEV_RULES_DIR = /etc/udev
41 UDEV_RULES = xen-backend.rules
43 DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),)
44 DE = $(if $(DESTDIR),$(shell readlink -f $(DESTDIR)),)
45 ifeq ($(findstring $(DI),$(DE)),$(DI))
46 HOTPLUGS=install-hotplug install-udev
47 else
48 ifeq ($(shell [ -x /usr/bin/udevinfo ] && [ `/usr/bin/udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'` -ge 059 ] && echo 1),1)
49 HOTPLUGS=install-udev
50 else
51 HOTPLUGS=install-hotplug
52 endif
53 endif
55 .PHONY: all
56 all:
58 .PHONY: build
59 build:
61 .PHONY: install
62 install: all install-initd install-configs install-scripts $(HOTPLUGS)
64 .PHONY: install-initd
65 install-initd:
66 [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
67 [ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
68 $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
69 $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
70 $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
72 .PHONY: install-configs
73 install-configs: $(XEN_CONFIGS)
74 [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
75 $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
76 [ -d $(DESTDIR)$(XEN_CONFIG_DIR)/auto ] || \
77 $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
78 for i in $(XEN_CONFIGS); \
79 do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
80 $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
81 done
83 .PHONY: install-scripts
84 install-scripts:
85 [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
86 $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
87 for i in $(XEN_SCRIPTS); \
88 do \
89 $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
90 done
91 for i in $(XEN_SCRIPT_DATA); \
92 do \
93 $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
94 done
96 .PHONY: install-hotplug
97 install-hotplug:
98 [ -d $(DESTDIR)$(XEN_HOTPLUG_DIR) ] || \
99 $(INSTALL_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR)
100 for i in $(XEN_HOTPLUG_SCRIPTS); \
101 do \
102 $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \
103 done
105 .PHONY: install-udev
106 install-udev:
107 [ -d $(DESTDIR)$(UDEV_RULES_DIR) ] || \
108 $(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
109 for i in $(UDEV_RULES); \
110 do \
111 $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \
112 ( cd $(DESTDIR)$(UDEV_RULES_DIR)/rules.d ; \
113 ln -sf ../$$i . ) \
114 done
116 .PHONY: clean
117 clean: