ia64/xen-unstable

view tools/console/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 06d84bf87159
children 903d88857972
line source
2 XEN_ROOT=../..
3 include $(XEN_ROOT)/tools/Rules.mk
5 DAEMON_INSTALL_DIR = /usr/sbin
6 CLIENT_INSTALL_DIR = /usr/libexec/xen
8 INSTALL = install
9 INSTALL_PROG = $(INSTALL) -m0755
10 INSTALL_DIR = $(INSTALL) -d -m0755
12 CFLAGS += -Wall -Werror -g3
14 CFLAGS += -I $(XEN_LIBXC)
15 CFLAGS += -I $(XEN_XENSTORE)
17 BIN = xenconsoled xenconsole
19 all: $(BIN)
21 clean:
22 $(RM) *.a *.so *.o *.rpm $(BIN)
23 $(RM) client/*.o daemon/*.o
25 xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
26 $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
27 -lxenctrl -lxenstore
29 xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
30 $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
31 -lxenctrl -lxenstore
33 install: $(BIN)
34 $(INSTALL_DIR) -p $(DESTDIR)/$(DAEMON_INSTALL_DIR)
35 $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(DAEMON_INSTALL_DIR)
36 $(INSTALL_DIR) -p $(DESTDIR)/$(CLIENT_INSTALL_DIR)
37 $(INSTALL_PROG) xenconsole $(DESTDIR)/$(CLIENT_INSTALL_DIR)