ia64/xen-unstable

view tools/examples/Makefile @ 7238:971e7c7411b3

Raise an exception if an error appears on the pipes to our children, and make
sure that the child's pipes are closed even under that exception. Move the
handling of POLLHUP to the end of the loop, so that we guarantee to read any
remaining data from the child if POLLHUP and POLLIN appear at the same time.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Thu Oct 06 10:13:11 2005 +0100 (2005-10-06)
parents b4b12c9f1200
children 306f6ec86ea8
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
13 # Xen configuration dir and configs to go there.
14 XEN_CONFIG_DIR = /etc/xen
15 XEN_CONFIGS = xend-config.sxp
16 XEN_CONFIGS += xmexample1
17 XEN_CONFIGS += xmexample2
18 XEN_CONFIGS += xmexample.vmx
20 # Xen script dir and scripts to go there.
21 XEN_SCRIPT_DIR = /etc/xen/scripts
22 XEN_SCRIPTS = network-bridge vif-bridge
23 XEN_SCRIPTS += network-route vif-route
24 XEN_SCRIPTS += block-phy
25 XEN_SCRIPTS += block-file
26 XEN_SCRIPTS += block-enbd
28 XEN_HOTPLUG_DIR = /etc/hotplug
29 XEN_HOTPLUG_SCRIPTS = xen-backend.agent
31 all:
32 build:
34 install: all install-initd install-configs install-scripts install-hotplug
36 install-initd:
37 [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
38 $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
39 $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
41 install-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 for i in $(XEN_CONFIGS); \
47 do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
48 $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
49 done
51 install-scripts:
52 [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
53 $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
54 for i in $(XEN_SCRIPTS); \
55 do \
56 $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
57 done
59 install-hotplug:
60 [ -d $(DESTDIR)$(XEN_HOTPLUG_DIR) ] || \
61 $(INSTALL_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR)
62 for i in $(XEN_HOTPLUG_SCRIPTS); \
63 do \
64 $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \
65 done
67 clean: