ia64/xen-unstable

view tools/xentrace/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 f33f18fbf2cb
line source
1 INSTALL = install
2 INSTALL_PROG = $(INSTALL) -m0755
3 INSTALL_DIR = $(INSTALL) -d -m0755
4 INSTALL_DATA = $(INSTALL) -m0644
6 XEN_ROOT=../..
7 include $(XEN_ROOT)/tools/Rules.mk
9 CFLAGS += -Wall -Werror -O3
11 CFLAGS += -I $(XEN_XC)
12 CFLAGS += -I $(XEN_LIBXC)
14 HDRS = $(wildcard *.h)
15 OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
17 BIN = xentrace
18 SCRIPTS = xentrace_format
19 MAN1 = $(wildcard *.1)
20 MAN8 = $(wildcard *.8)
22 all: build
23 build: $(BIN)
25 install: build
26 [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
27 [ -d $(DESTDIR)/usr/share/man/man1 ] || \
28 $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man1
29 [ -d $(DESTDIR)/usr/share/man/man8 ] || \
30 $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man8
31 $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin
32 $(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/share/man/man1
33 $(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/share/man/man8
35 clean:
36 $(RM) *.a *.so *.o *.rpm $(BIN)
38 %: %.c $(HDRS) Makefile
39 $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl