1XEN_ROOT = $(CURDIR)/../..
2include $(XEN_ROOT)/tools/Rules.mk
3
4# Xen configuration dir and configs to go there.
5XEN_READMES = README
6XEN_READMES += README.incompatibilities
7
8XEN_CONFIGS += xlexample.hvm
9XEN_CONFIGS += xlexample.pvlinux
10XEN_CONFIGS += xl.conf
11XEN_CONFIGS += cpupool
12
13XEN_CONFIGS += $(XEN_CONFIGS-y)
14
15.PHONY: all
16all:
17
18.PHONY: build
19build:
20
21.PHONY: install
22install: all install-readmes install-configs
23
24.PHONY: uninstall
25uninstall: uninstall-readmes uninstall-configs
26
27.PHONY: install-readmes
28install-readmes:
29	[ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
30		$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
31	set -e; for i in $(XEN_READMES); \
32	    do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
33	    $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
34	done
35
36.PHONY: uninstall-readmes
37uninstall-readmes:
38	rm -f $(addprefix $(DESTDIR)$(XEN_CONFIG_DIR)/, $(XEN_READMES))
39
40.PHONY: install-configs
41install-configs: $(XEN_CONFIGS)
42	[ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
43		$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
44	[ -d $(DESTDIR)$(XEN_CONFIG_DIR)/auto ] || \
45		$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
46	set -e; for i in $(XEN_CONFIGS); \
47	    do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
48	    $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
49	done
50
51.PHONY: uninstall-configs
52uninstall-configs:
53	rm -f $(addprefix $(DESTDIR)$(XEN_CONFIG_DIR)/, $(XEN_CONFIGS))
54
55.PHONY: clean
56clean:
57
58.PHONY: distclean
59distclean: clean
60