ia64/xen-unstable

view tools/misc/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 c5ee3b6f25b3
line source
1 INSTALL = install
2 INSTALL_PROG = $(INSTALL) -m0755
3 INSTALL_DIR = $(INSTALL) -d -m0755
5 XEN_ROOT=../..
6 include $(XEN_ROOT)/tools/Rules.mk
8 CFLAGS += -Wall -Werror -O3
10 INCLUDES += -I $(XEN_XC)
11 INCLUDES += -I $(XEN_LIBXC)
12 CFLAGS += $(INCLUDES)
14 HDRS = $(wildcard *.h)
16 TARGETS = xenperf xc_shadow
18 INSTALL_BIN = $(TARGETS) xencons
19 INSTALL_SBIN = netfix xm xend xenperf
21 all: build
22 build: $(TARGETS)
23 $(MAKE) -C miniterm
24 $(MAKE) -C cpuperf
25 ifneq ($(XEN_TARGET_ARCH),ia64)
26 $(MAKE) -C mbootpack
27 endif
28 $(MAKE) -C lomount
30 install: build
31 [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
32 [ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin
33 $(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
34 $(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin
35 $(MAKE) -C cpuperf install
36 $(MAKE) -C lomount install
37 # No sense in installing miniterm on the Xen box.
38 # $(MAKE) -C miniterm install
39 # Likewise mbootpack
40 # $(MAKE) -C mbootpack install
42 clean:
43 $(RM) *.o $(TARGETS) *~
44 $(MAKE) -C miniterm clean
45 $(MAKE) -C cpuperf clean
46 $(MAKE) -C mbootpack clean
47 $(MAKE) -C lomount clean
49 %.o: %.c $(HDRS) Makefile
50 $(CC) -c $(CFLAGS) -o $@ $<
52 $(TARGETS): %: %.o Makefile
53 $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl