ia64/xen-unstable

changeset 9666:ec68212e72c1

Merged.
author emellor@leeni.uk.xensource.com
date Mon Apr 10 18:18:03 2006 +0100 (2006-04-10)
parents bb97f5120d03 8e78e6b391e0
children 6df0bdcf8c9d 7ad21a787d3f
files
line diff
     1.1 --- a/Makefile	Mon Apr 10 18:17:54 2006 +0100
     1.2 +++ b/Makefile	Mon Apr 10 18:18:03 2006 +0100
     1.3 @@ -14,6 +14,7 @@ export XEN_TARGET_ARCH SUBARCH XEN_SYSTY
     1.4  endif
     1.5  
     1.6  # Default target must appear before any include lines
     1.7 +.PHONY: all
     1.8  all: dist
     1.9  
    1.10  XEN_ROOT=$(CURDIR)
    1.11 @@ -24,12 +25,11 @@ ifeq ($(XEN_TARGET_X86_PAE),y)
    1.12  export pae=y
    1.13  endif
    1.14  
    1.15 -.PHONY:	all dist install xen kernels tools dev-docs docs world clean
    1.16 -.PHONY:	mkpatches mrproper kbuild kdelete kclean
    1.17 -
    1.18  # build and install everything into the standard system directories
    1.19 +.PHONY: install
    1.20  install: install-xen install-kernels install-tools install-docs
    1.21  
    1.22 +.PHONY: build
    1.23  build: kernels
    1.24  	$(MAKE) -C xen build
    1.25  	$(MAKE) -C tools build
    1.26 @@ -38,10 +38,12 @@ build: kernels
    1.27  # The test target is for unit tests that can run without an installation.  Of
    1.28  # course, many tests require a machine running Xen itself, and these are
    1.29  # handled elsewhere.
    1.30 +.PHONY: test
    1.31  test:
    1.32  	$(MAKE) -C tools/python test
    1.33  
    1.34  # build and install everything into local dist directory
    1.35 +.PHONY: dist
    1.36  dist: DESTDIR=$(DISTDIR)/install
    1.37  dist: dist-xen dist-kernels dist-tools dist-docs
    1.38  	$(INSTALL_DIR) $(DISTDIR)/check
    1.39 @@ -54,67 +56,83 @@ dist-%: install-%
    1.40  	@: # do nothing
    1.41  
    1.42  # Legacy dist targets
    1.43 +.PHONY: xen tools kernels docs
    1.44  xen: dist-xen
    1.45  tools: dist-tools
    1.46  kernels: dist-kernels
    1.47  docs: dist-docs
    1.48  
    1.49 +.PHONY: prep-kernels
    1.50  prep-kernels:
    1.51  	for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
    1.52  
    1.53 +.PHONY: install-xen
    1.54  install-xen:
    1.55  	$(MAKE) -C xen install
    1.56  
    1.57 +.PHONY: install-tools
    1.58  install-tools:
    1.59  	$(MAKE) -C tools install
    1.60  
    1.61 +.PHONY: install-kernels
    1.62  install-kernels:
    1.63  	for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
    1.64  
    1.65 +.PHONY: install-docs
    1.66  install-docs:
    1.67  	sh ./docs/check_pkgs && $(MAKE) -C docs install || true
    1.68  
    1.69 +.PHONY: dev-docs
    1.70  dev-docs:
    1.71  	$(MAKE) -C docs dev-docs
    1.72  
    1.73  # Build all the various kernels and modules
    1.74 +.PHONY: kbuild
    1.75  kbuild: kernels
    1.76  
    1.77  # Delete the kernel build trees entirely
    1.78 +.PHONY: kdelete
    1.79  kdelete:
    1.80  	for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
    1.81  
    1.82  # Clean the kernel build trees
    1.83 +.PHONY: kclean
    1.84  kclean:
    1.85  	for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
    1.86  
    1.87  # Make patches from kernel sparse trees
    1.88 +.PHONY: mkpatches
    1.89  mkpatches:
    1.90  	for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch; done
    1.91  
    1.92  # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
    1.93  # and place them in the install directory. 'make install' should then
    1.94  # copy them to the normal system directories
    1.95 +.PHONY: world
    1.96  world: 
    1.97  	$(MAKE) clean
    1.98  	$(MAKE) kdelete
    1.99  	$(MAKE) dist
   1.100  
   1.101  # clean doesn't do a kclean
   1.102 +.PHONY: clean
   1.103  clean:: 
   1.104  	$(MAKE) -C xen clean
   1.105  	$(MAKE) -C tools clean
   1.106  	$(MAKE) -C docs clean
   1.107  
   1.108  # clean, but blow away kernel build tree plus tarballs
   1.109 +.PHONY: distclean
   1.110  distclean: clean
   1.111  	rm -rf dist patches/tmp
   1.112  	for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
   1.113  	for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
   1.114  
   1.115  # Linux name for GNU distclean
   1.116 +.PHONY: mrproper
   1.117  mrproper: distclean
   1.118  
   1.119 +.PHONY: help
   1.120  help:
   1.121  	@echo 'Installation targets:'
   1.122  	@echo '  install          - build and install everything'
   1.123 @@ -156,6 +174,7 @@ help:
   1.124  	@echo '                     true if set to non-empty value, false otherwise'
   1.125  
   1.126  # Use this target with extreme care!
   1.127 +.PHONY: uninstall
   1.128  uninstall: D=$(DESTDIR)
   1.129  uninstall:
   1.130  	[ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
   1.131 @@ -189,5 +208,6 @@ uninstall:
   1.132  	rm -rf $(D)/usr/share/man/man8/xen*
   1.133  
   1.134  # Legacy targets for compatibility
   1.135 +.PHONY: linux26
   1.136  linux26:
   1.137  	$(MAKE) 'KERNELS=linux-2.6*' kernels
     2.1 --- a/buildconfigs/Rules.mk	Mon Apr 10 18:17:54 2006 +0100
     2.2 +++ b/buildconfigs/Rules.mk	Mon Apr 10 18:18:03 2006 +0100
     2.3 @@ -6,8 +6,6 @@ export DESTDIR
     2.4  ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
     2.5  ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
     2.6  
     2.7 -.PHONY:	mkpatches mrproper
     2.8 -
     2.9  # Setup pristine search path
    2.10  PRISTINE_SRC_PATH	?= .:..
    2.11  vpath pristine-% $(PRISTINE_SRC_PATH)
    2.12 @@ -61,6 +59,7 @@ ifneq ($(PATCHDIRS),)
    2.13  $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep: 
    2.14  	@echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
    2.15  
    2.16 +.PHONY: clean
    2.17  clean::
    2.18  	rm -f patches/*/.makedep
    2.19  
    2.20 @@ -115,6 +114,7 @@ linux-2.6-xen.patch: ref-linux-$(LINUX_V
    2.21  	rm -rf pristine-$(*)* ref-$(*)* $*.tar.bz2
    2.22  	rm -rf $*-xen.patch
    2.23  
    2.24 +.PHONY: config-update-pae
    2.25  config-update-pae:
    2.26  ifeq ($(XEN_TARGET_X86_PAE),y)
    2.27  	sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
     3.1 --- a/buildconfigs/mk.linux-2.6-xen	Mon Apr 10 18:17:54 2006 +0100
     3.2 +++ b/buildconfigs/mk.linux-2.6-xen	Mon Apr 10 18:18:03 2006 +0100
     3.3 @@ -8,9 +8,8 @@ LINUX_DIR    = linux-$(LINUX_VER)-$(EXTR
     3.4  
     3.5  include buildconfigs/Rules.mk
     3.6  
     3.7 -.PHONY: build clean delete
     3.8 -
     3.9  # The real action starts here!
    3.10 +.PHONY: build
    3.11  build: $(LINUX_DIR)/include/linux/autoconf.h
    3.12  	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    3.13  	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    3.14 @@ -39,14 +38,18 @@ build: $(LINUX_DIR)/include/linux/autoco
    3.15  	  rm -f Makefile ; mv Mk.tmp Makefile )
    3.16  	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
    3.17  
    3.18 +.PHONY: prep
    3.19  prep: $(LINUX_DIR)/include/linux/autoconf.h
    3.20  
    3.21 +.PHONY: config
    3.22  config: CONFIGMODE = menuconfig
    3.23  config: $(LINUX_DIR)/include/linux/autoconf.h
    3.24  	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
    3.25  
    3.26 +.PHONY: clean
    3.27  clean::
    3.28  	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
    3.29  
    3.30 +.PHONY: delete
    3.31  delete: 
    3.32  	rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR) 
     4.1 --- a/docs/Makefile	Mon Apr 10 18:17:54 2006 +0100
     4.2 +++ b/docs/Makefile	Mon Apr 10 18:18:03 2006 +0100
     4.3 @@ -26,22 +26,28 @@ DOC_HTML	:= $(patsubst src/%.tex,html/%/
     4.4  
     4.5  GFX = $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
     4.6  
     4.7 -.PHONY:	all build dev-docs python-dev-docs ps pdf html clean install
     4.8 +.PHONY: all
     4.9 +all: build
    4.10  
    4.11 -all: build
    4.12 +.PHONY: build
    4.13  build: ps pdf html man-pages
    4.14  	rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc
    4.15  
    4.16 +.PHONY: dev-docs
    4.17  dev-docs: python-dev-docs
    4.18  
    4.19 +.PHONY: ps
    4.20  ps: $(DOC_PS)
    4.21  
    4.22 +.PHONY: pdf
    4.23  pdf: $(DOC_PDF)
    4.24  
    4.25 +.PHONY: html
    4.26  html:
    4.27  	@if which $(LATEX2HTML) 1>/dev/null 2>/dev/null; then \
    4.28  	$(MAKE) $(DOC_HTML); fi
    4.29  
    4.30 +.PHONY: python-dev-docs
    4.31  python-dev-docs:
    4.32  	@mkdir -v -p api/tools/python
    4.33  	@if which $(DOXYGEN) 1>/dev/null 2>/dev/null; then         \
    4.34 @@ -50,6 +56,7 @@ python-dev-docs:
    4.35  	$(MAKE) -C api/tools/python/latex ; else                   \
    4.36          echo "Doxygen not installed; skipping python-dev-docs."; fi
    4.37  
    4.38 +.PHONY: man-pages
    4.39  man-pages:
    4.40  	@if which $(POD2MAN) 1>/dev/null 2>/dev/null; then \
    4.41  	$(MAKE) $(DOC_MAN1) $(DOC_MAN5); fi
    4.42 @@ -64,6 +71,7 @@ man5/%.5: man/%.pod.5 Makefile
    4.43  	$(POD2MAN) --release=$(VERSION) --name=`echo $@ | sed 's/^man5.//'| \
    4.44  		sed 's/.5//'` -s 5 -c "Xen" $< $@
    4.45  
    4.46 +.PHONY: clean
    4.47  clean:
    4.48  	rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~ 
    4.49  	rm -rf *.ilg *.log *.ind *.toc *.bak core
    4.50 @@ -72,6 +80,7 @@ clean:
    4.51  	rm -rf man5
    4.52  	rm -rf man1
    4.53  
    4.54 +.PHONY: install
    4.55  install: all
    4.56  	rm -rf $(DESTDIR)$(pkgdocdir)
    4.57  	$(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
     5.1 --- a/extras/mini-os/Makefile	Mon Apr 10 18:17:54 2006 +0100
     5.2 +++ b/extras/mini-os/Makefile	Mon Apr 10 18:18:03 2006 +0100
     5.3 @@ -37,8 +37,10 @@ OBJS += $(patsubst %.c,%.o,$(wildcard co
     5.4  HDRS := $(wildcard include/*.h)
     5.5  HDRS += $(wildcard include/xen/*.h)
     5.6  
     5.7 +.PHONY: default
     5.8  default: $(TARGET)
     5.9  
    5.10 +.PHONY: links
    5.11  links:
    5.12  	[ -e include/xen ] || ln -sf ../../../xen/include/public include/xen
    5.13  
    5.14 @@ -46,6 +48,7 @@ links:
    5.15  	$(LD) -N -T minios-$(TARGET_ARCH).lds $(OBJS) -o $@.elf
    5.16  	gzip -f -9 -c $@.elf >$@.gz
    5.17  
    5.18 +.PHONY: clean
    5.19  clean:
    5.20  	find . -type f -name '*.o' | xargs rm -f
    5.21  	rm -f *.o *~ core $(TARGET).elf $(TARGET).raw $(TARGET) $(TARGET).gz
     6.1 --- a/tools/Makefile	Mon Apr 10 18:17:54 2006 +0100
     6.2 +++ b/tools/Makefile	Mon Apr 10 18:18:03 2006 +0100
     6.3 @@ -24,14 +24,14 @@ SUBDIRS += python
     6.4  SUBDIRS += pygrub
     6.5  endif
     6.6  
     6.7 -.PHONY: all install clean check check_clean ioemu eioemuinstall ioemuclean
     6.8 -
     6.9 +.PHONY: all
    6.10  all: check
    6.11  	@set -e; for subdir in $(SUBDIRS); do \
    6.12  		$(MAKE) -C $$subdir $@; \
    6.13  	done
    6.14  	$(MAKE) ioemu
    6.15  
    6.16 +.PHONY: install
    6.17  install: check
    6.18  	@set -e; for subdir in $(SUBDIRS); do \
    6.19  		$(MAKE) -C $$subdir $@; \
    6.20 @@ -39,18 +39,22 @@ install: check
    6.21  	$(MAKE) ioemuinstall
    6.22  	$(INSTALL_DIR) -p $(DESTDIR)/var/xen/dump
    6.23  
    6.24 +.PHONY: clean
    6.25  clean: check_clean
    6.26  	@set -e; for subdir in $(SUBDIRS); do \
    6.27  		$(MAKE) -C $$subdir $@; \
    6.28  	done
    6.29  	$(MAKE) ioemuclean
    6.30  
    6.31 +.PHONY: check
    6.32  check:
    6.33  	$(MAKE) -C check
    6.34  
    6.35 +.PHONY: check_clean
    6.36  check_clean:
    6.37  	$(MAKE) -C check clean
    6.38  
    6.39 +.PHONY: ioemu ioemuinstall ioemuclean
    6.40  ifndef XEN_NO_IOEMU
    6.41  ioemu ioemuinstall ioemuclean:
    6.42  	[ -f ioemu/config-host.h ] || \
     7.1 --- a/tools/Rules.mk	Mon Apr 10 18:17:54 2006 +0100
     7.2 +++ b/tools/Rules.mk	Mon Apr 10 18:18:03 2006 +0100
     7.3 @@ -23,6 +23,7 @@ CFLAGS += -D__XEN_INTERFACE_VERSION__=0x
     7.4  %.o: %.cc
     7.5  	$(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
     7.6  
     7.7 +.PHONY: mk-symlinks
     7.8  mk-symlinks: LINUX_ROOT=$(XEN_ROOT)/linux-2.6-xen-sparse
     7.9  mk-symlinks:
    7.10  	mkdir -p xen
     8.1 --- a/tools/blktap/Makefile	Mon Apr 10 18:17:54 2006 +0100
     8.2 +++ b/tools/blktap/Makefile	Mon Apr 10 18:18:03 2006 +0100
     8.3 @@ -39,11 +39,13 @@ IBINS   :=
     8.4  
     8.5  LIB      = libblktap.so libblktap.so.$(MAJOR) libblktap.so.$(MAJOR).$(MINOR)
     8.6  
     8.7 +.PHONY: all
     8.8  all: mk-symlinks libblktap.so #blkdump
     8.9  	@set -e; for subdir in $(SUBDIRS); do \
    8.10  		$(MAKE) -C $$subdir $@;       \
    8.11  	done
    8.12  
    8.13 +.PHONY: install
    8.14  install: all
    8.15  	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
    8.16  	$(INSTALL_DIR) -p $(DESTDIR)/usr/include
    8.17 @@ -54,12 +56,14 @@ install: all
    8.18  		$(MAKE) -C $$subdir $@;       \
    8.19  	done
    8.20  
    8.21 +.PHONY: clean
    8.22  clean:
    8.23  	rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS blkdump
    8.24  	@set -e; for subdir in $(SUBDIRS); do \
    8.25  		$(MAKE) -C $$subdir $@;       \
    8.26  	done
    8.27  
    8.28 +.PHONY: rpm
    8.29  rpm: all
    8.30  	rm -rf staging
    8.31  	mkdir staging
    8.32 @@ -82,6 +86,7 @@ blkdump: libblktap.so
    8.33  
    8.34  .PHONY: TAGS clean install mk-symlinks rpm
    8.35  
    8.36 +.PHONY: TAGS
    8.37  TAGS:
    8.38  	etags -t $(SRCS) *.h
    8.39  
     9.1 --- a/tools/blktap/parallax/Makefile	Mon Apr 10 18:17:54 2006 +0100
     9.2 +++ b/tools/blktap/parallax/Makefile	Mon Apr 10 18:18:03 2006 +0100
     9.3 @@ -43,11 +43,14 @@ DEPS     = .*.d
     9.4  OBJS     = $(patsubst %.c,%.o,$(SRCS))
     9.5  IBINS    = parallax $(VDI_TOOLS)
     9.6  
     9.7 +.PHONY: all
     9.8  all: $(VDI_TOOLS) parallax blockstored
     9.9  
    9.10 +.PHONY: install
    9.11  install: all
    9.12  	$(INSTALL_PROG) $(IBINS) $(DESTDIR)$(PARALLAX_INSTALL_DIR)
    9.13  
    9.14 +.PHONY: clean
    9.15  clean:
    9.16  	rm -rf *.o *~ $(DEPS) xen TAGS $(VDI_TOOLS) parallax vdi_unittest
    9.17  
    9.18 @@ -57,5 +60,4 @@ parallax: $(PLX_SRCS)
    9.19  ${VDI_TOOLS}: %: %.c $(VDI_SRCS)
    9.20  	$(CC) $(CFLAGS) -o $@ $@.c $(LDFLAGS) $(VDI_SRCS)
    9.21  
    9.22 -.PHONY: TAGS clean install rpm
    9.23  -include $(DEPS)
    10.1 --- a/tools/blktap/ublkback/Makefile	Mon Apr 10 18:17:54 2006 +0100
    10.2 +++ b/tools/blktap/ublkback/Makefile	Mon Apr 10 18:18:03 2006 +0100
    10.3 @@ -21,12 +21,16 @@ DEPS     = .*.d
    10.4  
    10.5  OBJS     = $(patsubst %.c,%.o,$(SRCS))
    10.6  
    10.7 +.PHONY: all
    10.8  all: $(IBIN)
    10.9  
   10.10  LINUX_ROOT := $(wildcard $(XEN_ROOT)/linux-2.6.*-xen-sparse)
   10.11  
   10.12 +.PHONY: install
   10.13  install:
   10.14  	$(INSTALL_PROG) $(IBIN) $(DESTDIR)$(INSTALL_DIR)
   10.15 +
   10.16 +.PHONY: clean
   10.17  clean:
   10.18  	rm -rf *.o*~ $(DEPS) xen TAGS $(IBIN)
   10.19  
   10.20 @@ -34,6 +38,4 @@ ublkback:
   10.21  	$(CC) $(CFLAGS) -o ublkback -L$(XEN_LIBXC) -L. -L..  \
   10.22  	      -lblktap -laio ublkback.c ublkbacklib.c -pg
   10.23  
   10.24 -.PHONY: clean install
   10.25 -
   10.26  -include $(DEPS)
    11.1 --- a/tools/check/Makefile	Mon Apr 10 18:17:54 2006 +0100
    11.2 +++ b/tools/check/Makefile	Mon Apr 10 18:18:03 2006 +0100
    11.3 @@ -1,7 +1,9 @@
    11.4  
    11.5 +.PHONY: all
    11.6  all: build
    11.7  
    11.8  # Check this machine is OK for building on.
    11.9 +.PHONY: build
   11.10  build:
   11.11  	./chk build
   11.12  
   11.13 @@ -9,8 +11,10 @@ build:
   11.14  # DO NOT use this check from 'make install' in the parent
   11.15  # directory, as that target can be used to make an installable
   11.16  # copy rather than actually installing.
   11.17 +.PHONY: install
   11.18  install:
   11.19  	./chk install
   11.20  
   11.21 +.PHONY: clean
   11.22  clean:
   11.23 -	./chk clean
   11.24 \ No newline at end of file
   11.25 +	./chk clean
    12.1 --- a/tools/console/Makefile	Mon Apr 10 18:17:54 2006 +0100
    12.2 +++ b/tools/console/Makefile	Mon Apr 10 18:18:03 2006 +0100
    12.3 @@ -16,8 +16,10 @@ CFLAGS  += -I $(XEN_XENSTORE)
    12.4  
    12.5  BIN      = xenconsoled xenconsole
    12.6  
    12.7 +.PHONY: all
    12.8  all: $(BIN)
    12.9  
   12.10 +.PHONY: clean
   12.11  clean:
   12.12  	$(RM) *.a *.so *.o *.rpm $(BIN)
   12.13  	$(RM) client/*.o daemon/*.o
   12.14 @@ -30,6 +32,7 @@ xenconsole: $(patsubst %.c,%.o,$(wildcar
   12.15  	$(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
   12.16  	      -lxenctrl -lxenstore
   12.17  
   12.18 +.PHONY: install
   12.19  install: $(BIN)
   12.20  	$(INSTALL_DIR) -p $(DESTDIR)/$(DAEMON_INSTALL_DIR)
   12.21  	$(INSTALL_PROG) xenconsoled $(DESTDIR)/$(DAEMON_INSTALL_DIR)
    13.1 --- a/tools/console/testsuite/Makefile	Mon Apr 10 18:17:54 2006 +0100
    13.2 +++ b/tools/console/testsuite/Makefile	Mon Apr 10 18:18:03 2006 +0100
    13.3 @@ -3,10 +3,12 @@ include $(XEN_ROOT)/tools/Rules.mk
    13.4  
    13.5  LDFLAGS=-static
    13.6  
    13.7 +.PHONY: all
    13.8  all: console-dom0 console-domU procpipe
    13.9  
   13.10  console-dom0: console-dom0.o
   13.11  console-domU: console-domU.o
   13.12  procpipe: procpipe.o
   13.13  
   13.14 +.PHONY: clean
   13.15  clean:; $(RM) *.o console-domU console-dom0 procpipe
    14.1 --- a/tools/debugger/libxendebug/Makefile	Mon Apr 10 18:17:54 2006 +0100
    14.2 +++ b/tools/debugger/libxendebug/Makefile	Mon Apr 10 18:18:03 2006 +0100
    14.3 @@ -26,10 +26,14 @@ PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS
    14.4  LIB      := libxendebug.a libxendebug.so
    14.5  LIB      += libxendebug.so.$(MAJOR) libxendebug.so.$(MAJOR).$(MINOR)
    14.6  
    14.7 +.PHONY: all
    14.8  all: build
    14.9 +
   14.10 +.PHONY: build
   14.11  build:
   14.12  	$(MAKE) $(LIB)
   14.13  
   14.14 +.PHONY: install
   14.15  install: build
   14.16  	[ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
   14.17  	[ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
   14.18 @@ -39,14 +43,15 @@ install: build
   14.19  	ln -sf libxendebug.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxendebug.so
   14.20  	$(INSTALL_DATA) xendebug.h $(DESTDIR)/usr/include
   14.21  
   14.22 -.PHONY: TAGS clean rpm install all
   14.23 -
   14.24 +.PHONY: TAGS
   14.25  TAGS:
   14.26  	etags -t $(SRCS) *.h
   14.27  
   14.28 +.PHONY: clean
   14.29  clean:
   14.30  	rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
   14.31  
   14.32 +.PHONY: rpm
   14.33  rpm: build
   14.34  	rm -rf staging
   14.35  	mkdir staging
    15.1 --- a/tools/debugger/pdb/Makefile	Mon Apr 10 18:17:54 2006 +0100
    15.2 +++ b/tools/debugger/pdb/Makefile	Mon Apr 10 18:18:03 2006 +0100
    15.3 @@ -33,6 +33,7 @@ LIBS       += unix str
    15.4  
    15.5  # bc = byte-code, dc = debug byte-code
    15.6  # patches = patch linux domU source code
    15.7 +.PHONY: all 
    15.8  all : dc
    15.9  
   15.10  SOURCES    += pdb_caml_xc.c 
   15.11 @@ -51,5 +52,6 @@ RESULT      = pdb
   15.12  include $(OCAMLMAKEFILE)
   15.13  
   15.14  PATCHDIR    = ./linux-2.6-patches
   15.15 +.PHONY: patches 
   15.16  patches :
   15.17  	make -C $(PATCHDIR) patches
    16.1 --- a/tools/debugger/pdb/linux-2.6-module/Makefile	Mon Apr 10 18:17:54 2006 +0100
    16.2 +++ b/tools/debugger/pdb/linux-2.6-module/Makefile	Mon Apr 10 18:18:03 2006 +0100
    16.3 @@ -10,10 +10,12 @@ CFLAGS += -g
    16.4  CFLAGS += -Wall
    16.5  CFLAGS += -Werror
    16.6  
    16.7 +.PHONY: module 
    16.8  module : 
    16.9  #	make KBUILD_VERBOSE=1 ARCH=xen -C $(KDIR) M=$(PWD) modules
   16.10  	make                  ARCH=xen -C $(KDIR) M=$(PWD) modules
   16.11  
   16.12 +.PHONY: clean 
   16.13  clean :
   16.14  	make -C $(KDIR) M=$(PWD) clean
   16.15  
    17.1 --- a/tools/debugger/pdb/linux-2.6-patches/Makefile	Mon Apr 10 18:17:54 2006 +0100
    17.2 +++ b/tools/debugger/pdb/linux-2.6-patches/Makefile	Mon Apr 10 18:18:03 2006 +0100
    17.3 @@ -3,6 +3,7 @@ LINUX_DIR  = linux-2.6.12-xenU
    17.4  KDIR       = $(XEN_ROOT)/$(LINUX_DIR)
    17.5  PATCH_DIR  = $(CURDIR)
    17.6  
    17.7 +.PHONY: patches 
    17.8  patches : patches-done
    17.9  
   17.10  patches-done :
    18.1 --- a/tools/examples/Makefile	Mon Apr 10 18:17:54 2006 +0100
    18.2 +++ b/tools/examples/Makefile	Mon Apr 10 18:18:03 2006 +0100
    18.3 @@ -50,11 +50,16 @@ HOTPLUGS=install-hotplug
    18.4  endif
    18.5  endif
    18.6  
    18.7 +.PHONY: all
    18.8  all:
    18.9 +
   18.10 +.PHONY: build
   18.11  build:
   18.12  
   18.13 +.PHONY: install
   18.14  install: all install-initd install-configs install-scripts $(HOTPLUGS)
   18.15  
   18.16 +.PHONY: install-initd
   18.17  install-initd:
   18.18  	[ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
   18.19  	[ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
   18.20 @@ -62,6 +67,7 @@ install-initd:
   18.21  	$(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
   18.22  	$(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
   18.23  
   18.24 +.PHONY: install-configs
   18.25  install-configs: $(XEN_CONFIGS)
   18.26  	[ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
   18.27  		$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
   18.28 @@ -72,6 +78,7 @@ install-configs: $(XEN_CONFIGS)
   18.29  	    $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
   18.30  	done
   18.31  
   18.32 +.PHONY: install-scripts
   18.33  install-scripts:
   18.34  	[ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
   18.35  		$(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
   18.36 @@ -84,6 +91,7 @@ install-scripts:
   18.37  	    $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
   18.38  	done
   18.39  
   18.40 +.PHONY: install-hotplug
   18.41  install-hotplug:
   18.42  	[ -d $(DESTDIR)$(XEN_HOTPLUG_DIR) ] || \
   18.43  		$(INSTALL_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR)
   18.44 @@ -92,6 +100,7 @@ install-hotplug:
   18.45  	    $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \
   18.46  	done
   18.47  
   18.48 +.PHONY: install-udev
   18.49  install-udev:
   18.50  	[ -d $(DESTDIR)$(UDEV_RULES_DIR) ] || \
   18.51  		$(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
   18.52 @@ -102,4 +111,5 @@ install-udev:
   18.53  	        ln -sf ../$$i . ) \
   18.54  	done
   18.55  
   18.56 +.PHONY: clean
   18.57  clean:
    19.1 --- a/tools/firmware/Makefile	Mon Apr 10 18:17:54 2006 +0100
    19.2 +++ b/tools/firmware/Makefile	Mon Apr 10 18:18:03 2006 +0100
    19.3 @@ -13,8 +13,7 @@ SUBDIRS += acpi
    19.4  SUBDIRS += vmxassist
    19.5  SUBDIRS += hvmloader
    19.6  
    19.7 -.PHONY: all install clean
    19.8 -
    19.9 +.PHONY: all
   19.10  all:
   19.11  	@set -e; if ! `which bcc 1>/dev/null 2>/dev/null`; then \
   19.12  	echo "***********************************************************"; \
   19.13 @@ -28,10 +27,12 @@ all:
   19.14  	fi
   19.15  
   19.16  
   19.17 +.PHONY: install
   19.18  install: all
   19.19  	[ -d $(INSTALL_DIR) ] || install -d -m0755 $(INSTALL_DIR)
   19.20  	[ ! -e $(TARGET) ] || install -m0644 $(TARGET) $(INSTALL_DIR)
   19.21  
   19.22 +.PHONY: clean
   19.23  clean: 
   19.24  	@set -e; for subdir in $(SUBDIRS); do \
   19.25  		$(MAKE) -C $$subdir $@; \
    20.1 --- a/tools/firmware/acpi/Makefile	Mon Apr 10 18:17:54 2006 +0100
    20.2 +++ b/tools/firmware/acpi/Makefile	Mon Apr 10 18:18:03 2006 +0100
    20.3 @@ -33,6 +33,7 @@ IASL_VER=acpica-unix-20050513
    20.4  IASL_URL=http://developer.intel.com/technology/iapc/acpi/downloads/$(IASL_VER).tar.gz
    20.5  
    20.6  vpath iasl $(PATH)
    20.7 +.PHONY: all
    20.8  all:$(ACPI_BIN)
    20.9  
   20.10  acpi_dsdt.c:acpi_dsdt.asl
   20.11 @@ -42,6 +43,7 @@ acpi_dsdt.c:acpi_dsdt.asl
   20.12  	echo "int DsdtLen=sizeof(AmlCode);" >> acpi_dsdt.c
   20.13  	rm *.aml
   20.14  
   20.15 +.PHONY: iasl
   20.16  iasl:
   20.17  	@echo
   20.18  	@echo "ACPI ASL compiler(iasl) is needed"
   20.19 @@ -60,8 +62,10 @@ iasl:
   20.20  $(ACPI_BIN):$(ACPI_GEN)
   20.21  	./$(ACPI_GEN) $(ACPI_BIN)
   20.22  
   20.23 +.PHONY: clean
   20.24  clean:
   20.25  	rm -rf *.o $(ACPI_GEN) $(ACPI_BIN) $(IASL_VER) 
   20.26  	rm -rf  $(IASL_VER).tar.gz
   20.27  
   20.28 +.PHONY: install
   20.29  install: all
    21.1 --- a/tools/firmware/hvmloader/Makefile	Mon Apr 10 18:17:54 2006 +0100
    21.2 +++ b/tools/firmware/hvmloader/Makefile	Mon Apr 10 18:18:03 2006 +0100
    21.3 @@ -42,6 +42,7 @@ OBJCOPY  = objcopy
    21.4  CFLAGS  += $(DEFINES) -I. $(XENINC) -fno-builtin -O2 -msoft-float
    21.5  LDFLAGS  = -m32 -nostdlib -Wl,-N -Wl,-Ttext -Wl,$(LOADADDR)
    21.6  
    21.7 +.PHONY: all
    21.8  all: hvmloader
    21.9  
   21.10  hvmloader: roms.h hvmloader.c acpi_madt.c
   21.11 @@ -57,6 +58,7 @@ roms.h:	../rombios/BIOS-bochs-latest ../
   21.12  	./mkhex vmxassist ../vmxassist/vmxassist.bin >> roms.h
   21.13  	./mkhex acpi ../acpi/acpi.bin >> roms.h
   21.14  
   21.15 +.PHONY: clean
   21.16  clean:
   21.17  	rm -f roms.h acpi.h
   21.18  	rm -f hvmloader hvmloader.tmp hvmloader.o $(OBJECTS)
    22.1 --- a/tools/firmware/rombios/Makefile	Mon Apr 10 18:17:54 2006 +0100
    22.2 +++ b/tools/firmware/rombios/Makefile	Mon Apr 10 18:18:03 2006 +0100
    22.3 @@ -3,10 +3,13 @@ BIOS_BUILDS = BIOS-bochs-latest
    22.4  #BIOS_BUILDS += BIOS-bochs-4-processors
    22.5  #BIOS_BUILDS += BIOS-bochs-8-processors
    22.6  
    22.7 +.PHONY: all
    22.8  all: bios
    22.9  
   22.10 +.PHONY: bios
   22.11  bios: biossums ${BIOS_BUILDS}
   22.12  
   22.13 +.PHONY: clean
   22.14  clean:
   22.15  	rm -f  *.o *.a *.s rombios.bin _rombios*_.c
   22.16  	rm -f  as86-sym.txt ld86-sym.txt 
    23.1 --- a/tools/firmware/vgabios/Makefile	Mon Apr 10 18:17:54 2006 +0100
    23.2 +++ b/tools/firmware/vgabios/Makefile	Mon Apr 10 18:18:03 2006 +0100
    23.3 @@ -10,17 +10,22 @@ RELVERS = `pwd | sed "s-.*/--" | sed "s/
    23.4  
    23.5  VGABIOS_DATE = "-DVGABIOS_DATE=\"$(RELDATE)\""
    23.6  
    23.7 +.PHONY: all
    23.8  all: bios cirrus-bios
    23.9  
   23.10 +.PHONY: bios
   23.11  bios: biossums vgabios.bin vgabios.debug.bin 
   23.12  
   23.13 +.PHONY: cirrus-bios
   23.14  cirrus-bios: vgabios-cirrus.bin vgabios-cirrus.debug.bin
   23.15  
   23.16 +.PHONY: clean
   23.17  clean:
   23.18  	rm -f biossums *.o *.s *.ld86 \
   23.19            temp.awk.* vgabios*.orig _vgabios_* _vgabios-debug_* core vgabios*.bin vgabios*.txt $(RELEASE).bin *.bak
   23.20  	rm -f VGABIOS-lgpl-latest*.bin
   23.21  
   23.22 +.PHONY: release
   23.23  release: 
   23.24  	VGABIOS_VERS=\"-DVGABIOS_VERS=\\\"$(RELVERS)\\\"\" make bios cirrus-bios
   23.25  	/bin/rm -f  *.o *.s *.ld86 \
    24.1 --- a/tools/firmware/vmxassist/Makefile	Mon Apr 10 18:17:54 2006 +0100
    24.2 +++ b/tools/firmware/vmxassist/Makefile	Mon Apr 10 18:18:03 2006 +0100
    24.3 @@ -43,6 +43,7 @@ LDFLAGS  = -m elf_i386
    24.4  
    24.5  OBJECTS = head.o trap.o vm86.o setup.o util.o
    24.6  
    24.7 +.PHONY: all
    24.8  all: vmxassist.bin
    24.9  
   24.10  vmxassist.bin: vmxassist.ld $(OBJECTS)
   24.11 @@ -74,6 +75,7 @@ offsets.h: gen
   24.12  gen:	vm86.h gen.c
   24.13  	$(HOSTCC) $(HOSTCFLAGS) -I. $(XENINC) -o gen gen.c
   24.14  
   24.15 +.PHONY: clean
   24.16  clean:
   24.17  	rm -f vmxassist vmxassist.tmp vmxassist.bin vmxassist.run vmxassist.sym head.s
   24.18  	rm -f $(OBJECTS)
    25.1 --- a/tools/guest-headers/Makefile	Mon Apr 10 18:17:54 2006 +0100
    25.2 +++ b/tools/guest-headers/Makefile	Mon Apr 10 18:18:03 2006 +0100
    25.3 @@ -2,12 +2,16 @@
    25.4  XEN_ROOT=../..
    25.5  linuxsparsetree = $(XEN_ROOT)/linux-2.6-xen-sparse
    25.6  
    25.7 +.PHONY: all
    25.8  all:
    25.9  
   25.10 +.PHONY: check
   25.11  check:
   25.12  
   25.13 +.PHONY: install
   25.14  install:
   25.15  	mkdir -p $(DESTDIR)/usr/include/xen/linux
   25.16  	install -m0644 $(linuxsparsetree)/include/xen/public/*.h $(DESTDIR)/usr/include/xen/linux
   25.17  
   25.18 +.PHONY: clean
   25.19  clean:
    26.1 --- a/tools/ioemu/Makefile	Mon Apr 10 18:17:54 2006 +0100
    26.2 +++ b/tools/ioemu/Makefile	Mon Apr 10 18:18:03 2006 +0100
    26.3 @@ -19,6 +19,7 @@ LDFLAGS+=-static
    26.4  endif
    26.5  #DOCS=qemu-doc.html qemu-tech.html qemu.1
    26.6  
    26.7 +.PHONY: all
    26.8  all: $(DOCS) HEADERS
    26.9  	for d in $(TARGET_DIRS); do \
   26.10  	$(MAKE) -C $$d $@ || exit 1 ; \
   26.11 @@ -30,6 +31,7 @@ qemu-img: qemu-img.c block.c block-cow.c
   26.12  dyngen$(EXESUF): dyngen.c
   26.13  	$(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
   26.14  
   26.15 +.PHONY: clean
   26.16  clean:
   26.17  # avoid old build problems by removing potentially incorrect old files
   26.18  	rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h 
   26.19 @@ -41,6 +43,7 @@ clean:
   26.20  	rm -f config-host.mak config-host.h
   26.21  	rm -f keysym_adapter_sdl.h keysym_adapter_vnc.h
   26.22  
   26.23 +.PHONY: distclean
   26.24  distclean: clean
   26.25  	rm -f config-host.mak config-host.h
   26.26  	rm -f keysym_adapter_sdl.h keysym_adapter_vnc.h
   26.27 @@ -52,6 +55,7 @@ KEYMAPS=da     en-gb  et  fr     fr-ch  
   26.28  ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
   26.29  common  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr
   26.30  
   26.31 +.PHONY: install
   26.32  install: all 
   26.33  	mkdir -p "$(bindir)"
   26.34  	mkdir -p "$(DESTDIR)/$(datadir)"
   26.35 @@ -62,9 +66,11 @@ install: all
   26.36          done
   26.37  
   26.38  # various test targets
   26.39 +.PHONY: test speed test2
   26.40  test speed test2: all
   26.41  	$(MAKE) -C tests $@
   26.42  
   26.43 +.PHONY: TAGS
   26.44  TAGS: 
   26.45  	etags *.[ch] tests/*.[ch]
   26.46  
   26.47 @@ -79,6 +85,7 @@ qemu.1: qemu-doc.texi
   26.48  FILE=qemu-$(shell cat VERSION)
   26.49  
   26.50  # tar release (use 'make -k tar' on a checkouted tree)
   26.51 +.PHONY: tar
   26.52  tar:
   26.53  	rm -rf /tmp/$(FILE)
   26.54  	cp -r . /tmp/$(FILE)
   26.55 @@ -86,6 +93,7 @@ tar:
   26.56  	rm -rf /tmp/$(FILE)
   26.57  
   26.58  # generate a binary distribution
   26.59 +.PHONY: tarbin
   26.60  tarbin:
   26.61  	( cd $(DESTDIR) ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
   26.62  	$(DESTDIR)/$(bindir)/qemu $(DESTDIR)/$(bindir)/qemu-fast \
   26.63 @@ -100,6 +108,7 @@ ifneq ($(wildcard .depend),)
   26.64  include .depend
   26.65  endif
   26.66  
   26.67 +.PHONY: HEADERS
   26.68  HEADERS:
   26.69  
   26.70  ifdef CONFIG_SDL
    27.1 --- a/tools/ioemu/hw/vga.c	Mon Apr 10 18:17:54 2006 +0100
    27.2 +++ b/tools/ioemu/hw/vga.c	Mon Apr 10 18:18:03 2006 +0100
    27.3 @@ -1369,10 +1369,16 @@ static inline unsigned int cpuid_edx(uns
    27.4  {
    27.5      unsigned int eax, edx;
    27.6  
    27.7 -    __asm__("pushl %%ebx; cpuid; popl %%ebx"
    27.8 +#ifdef __x86_64__
    27.9 +#define __bx "rbx"
   27.10 +#else
   27.11 +#define __bx "ebx"
   27.12 +#endif
   27.13 +    __asm__("push %%"__bx"; cpuid; pop %%"__bx
   27.14              : "=a" (eax), "=d" (edx)
   27.15              : "0" (op)
   27.16              : "cx");
   27.17 +#undef __bx
   27.18  
   27.19      return edx;
   27.20  }
    28.1 --- a/tools/ioemu/target-i386-dm/Makefile	Mon Apr 10 18:17:54 2006 +0100
    28.2 +++ b/tools/ioemu/target-i386-dm/Makefile	Mon Apr 10 18:18:03 2006 +0100
    28.3 @@ -329,6 +329,7 @@ sdl.o: sdl.c keyboard_rdesktop.c
    28.4  sdlaudio.o: sdlaudio.c
    28.5  	$(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $<
    28.6  
    28.7 +.PHONY: depend
    28.8  depend: $(SRCS)
    28.9  	$(CC) -MM $(CFLAGS) $(DEFINES) $^ 1>.depend
   28.10  
   28.11 @@ -382,12 +383,15 @@ mixeng.o: mixeng.c mixeng.h mixeng_templ
   28.12  %.o: %.S
   28.13  	$(CC) $(DEFINES) -c -o $@ $<
   28.14  
   28.15 +.PHONY: clean
   28.16  clean:
   28.17  	rm -rf *.o  *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe slirp
   28.18  	rm -rf config.mak config.h
   28.19  
   28.20 +.PHONY: distclean
   28.21  distclean: clean
   28.22  
   28.23 +.PHONY: install
   28.24  install: all 
   28.25  	if [ ! -d $(INSTALL_DIR) ];then mkdir -p $(INSTALL_DIR);fi
   28.26  	if [ ! -d $(DESTDIR)$(configdir) ];then mkdir -p $(DESTDIR)$(configdir);fi
    29.1 --- a/tools/ioemu/vl.c	Mon Apr 10 18:17:54 2006 +0100
    29.2 +++ b/tools/ioemu/vl.c	Mon Apr 10 18:18:03 2006 +0100
    29.3 @@ -3245,8 +3245,17 @@ int main(int argc, char **argv)
    29.4      /* we always create the cdrom drive, even if no disk is there */
    29.5      bdrv_init();
    29.6      if (has_cdrom) {
    29.7 -        bs_table[2] = bdrv_new("cdrom");
    29.8 -        bdrv_set_type_hint(bs_table[2], BDRV_TYPE_CDROM);
    29.9 +        int fd;
   29.10 +        if ( (fd = open(hd_filename[2], O_RDONLY | O_BINARY)) < 0) {
   29.11 +                hd_filename[2]=NULL;
   29.12 +                bs_table[2]=NULL;
   29.13 +                fprintf(logfile, "Could not open CD %s.\n", hd_filename[i]);
   29.14 +        }
   29.15 +        else {
   29.16 +                close(fd);
   29.17 +                bs_table[2] = bdrv_new("cdrom");
   29.18 +                bdrv_set_type_hint(bs_table[2], BDRV_TYPE_CDROM);
   29.19 +        }
   29.20      }
   29.21  
   29.22      /* open the virtual block devices */
    30.1 --- a/tools/libxc/Makefile	Mon Apr 10 18:17:54 2006 +0100
    30.2 +++ b/tools/libxc/Makefile	Mon Apr 10 18:18:03 2006 +0100
    30.3 @@ -67,10 +67,14 @@ LIB += libxenctrl.so libxenctrl.so.$(MAJ
    30.4  LIB += libxenguest.a
    30.5  LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR)
    30.6  
    30.7 +.PHONY: all
    30.8  all: build
    30.9 +
   30.10 +.PHONY: build
   30.11  build: check-for-zlib mk-symlinks
   30.12  	$(MAKE) $(LIB)
   30.13  
   30.14 +.PHONY: check-for-zlib
   30.15  check-for-zlib:
   30.16  	@if [ ! -e /usr/include/zlib.h ]; then \
   30.17  	echo "***********************************************************"; \
   30.18 @@ -79,6 +83,7 @@ check-for-zlib:
   30.19  	false; \
   30.20  	fi
   30.21  
   30.22 +.PHONY: install
   30.23  install: build
   30.24  	[ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
   30.25  	[ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
   30.26 @@ -94,14 +99,15 @@ install: build
   30.27  	ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so
   30.28  	$(INSTALL_DATA) xenguest.h $(DESTDIR)/usr/include
   30.29  
   30.30 -.PHONY: TAGS clean rpm install all
   30.31 -
   30.32 +.PHONY: TAGS
   30.33  TAGS:
   30.34  	etags -t *.c *.h
   30.35  
   30.36 +.PHONY: clean
   30.37  clean:
   30.38  	rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
   30.39  
   30.40 +.PHONY: rpm
   30.41  rpm: build
   30.42  	rm -rf staging
   30.43  	mkdir staging
    31.1 --- a/tools/misc/Makefile	Mon Apr 10 18:17:54 2006 +0100
    31.2 +++ b/tools/misc/Makefile	Mon Apr 10 18:18:03 2006 +0100
    31.3 @@ -18,7 +18,10 @@ TARGETS  = xenperf xc_shadow
    31.4  INSTALL_BIN  = $(TARGETS) xencons
    31.5  INSTALL_SBIN = netfix xm xen-bugtool xend xenperf
    31.6  
    31.7 +.PHONY: all
    31.8  all: build
    31.9 +
   31.10 +.PHONY: build
   31.11  build: $(TARGETS)
   31.12  	$(MAKE) -C miniterm
   31.13  	$(MAKE) -C cpuperf
   31.14 @@ -27,6 +30,7 @@ ifneq ($(XEN_TARGET_ARCH),ia64)
   31.15  endif
   31.16  	$(MAKE) -C lomount
   31.17  
   31.18 +.PHONY: install
   31.19  install: build
   31.20  	[ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
   31.21  	[ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin
   31.22 @@ -39,6 +43,7 @@ install: build
   31.23  #       Likewise mbootpack
   31.24  #	$(MAKE) -C mbootpack install
   31.25  
   31.26 +.PHONY: clean
   31.27  clean:
   31.28  	$(RM) *.o $(TARGETS) *~
   31.29  	$(MAKE) -C miniterm clean
    32.1 --- a/tools/misc/cpuperf/Makefile	Mon Apr 10 18:17:54 2006 +0100
    32.2 +++ b/tools/misc/cpuperf/Makefile	Mon Apr 10 18:18:03 2006 +0100
    32.3 @@ -26,8 +26,10 @@ TARGETS      = cpuperf-xen cpuperf-perfc
    32.4  INSTALL_BIN  = $(TARGETS)
    32.5  
    32.6  
    32.7 +.PHONY: all
    32.8  all: $(TARGETS)
    32.9  
   32.10 +.PHONY: clean
   32.11  clean:
   32.12  	$(RM) *.o $(TARGETS)
   32.13  
   32.14 @@ -40,6 +42,7 @@ cpuperf-xen: cpuperf.c $(HDRS) Makefile
   32.15  cpuperf-perfcntr: cpuperf.c $(HDRS) Makefile
   32.16  	$(CC) $(CFLAGS) -DPERFCNTR -o $@ $<
   32.17  
   32.18 +.PHONY: install
   32.19  install: all
   32.20  	$(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
   32.21  
    33.1 --- a/tools/misc/lomount/Makefile	Mon Apr 10 18:17:54 2006 +0100
    33.2 +++ b/tools/misc/lomount/Makefile	Mon Apr 10 18:18:03 2006 +0100
    33.3 @@ -13,12 +13,17 @@ OBJS     = $(patsubst %.c,%.o,$(wildcard
    33.4  
    33.5  BIN      = lomount
    33.6  
    33.7 +.PHONY: all
    33.8  all: build
    33.9 +
   33.10 +.PHONY: build
   33.11  build: $(BIN)
   33.12  
   33.13 +.PHONY: install
   33.14  install: build
   33.15  	$(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin
   33.16  
   33.17 +.PHONY: clean
   33.18  clean:
   33.19  	$(RM) *.a *.so *.o *.rpm $(BIN)
   33.20  
    34.1 --- a/tools/misc/mbootpack/Makefile	Mon Apr 10 18:17:54 2006 +0100
    34.2 +++ b/tools/misc/mbootpack/Makefile	Mon Apr 10 18:18:03 2006 +0100
    34.3 @@ -8,9 +8,13 @@ INSTALL_DIR	= $(INSTALL) -d -m0755
    34.4  XEN_ROOT=../../..
    34.5  include $(XEN_ROOT)/tools/Rules.mk
    34.6  
    34.7 +.PHONY: all
    34.8  all: build
    34.9 +
   34.10 +.PHONY: build
   34.11  build: mbootpack
   34.12  
   34.13 +.PHONY: install
   34.14  install: build
   34.15  	$(INSTALL_PROG) mbootpack $(DESTDIR)/usr/bin
   34.16  
   34.17 @@ -33,6 +37,7 @@ DEPS     = .*.d
   34.18  mbootpack: $(OBJS)
   34.19  	$(HOSTCC) -o $@ $(filter-out %.a, $^)
   34.20  
   34.21 +.PHONY: clean
   34.22  clean:
   34.23  	$(RM) mbootpack *.o $(DEPS) bootsect setup bzimage_header.c bin2c
   34.24  
   34.25 @@ -60,7 +65,6 @@ buildimage.c: bzimage_header.c
   34.26  %.o: %.c
   34.27  	$(HOSTCC) $(DEPFLAGS) $(CFLAGS) $(INCS) $(DEFS) -c $< -o $@
   34.28  
   34.29 -.PHONY: all clean gdb
   34.30  .PRECIOUS: $(OBJS) $(OBJS:.o=.c) $(DEPS)
   34.31  .SUFFIXES: 
   34.32  
    35.1 --- a/tools/misc/miniterm/Makefile	Mon Apr 10 18:17:54 2006 +0100
    35.2 +++ b/tools/misc/miniterm/Makefile	Mon Apr 10 18:18:03 2006 +0100
    35.3 @@ -7,12 +7,15 @@ INSTALL_DIR	= $(INSTALL) -d -m0755
    35.4  
    35.5  TARGET = miniterm
    35.6  
    35.7 +.PHONY: all
    35.8  all: $(TARGET)
    35.9  
   35.10 +.PHONY: install
   35.11  install: all
   35.12  	[ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
   35.13  	$(INSTALL_PROG) $(TARGET) $(DESTDIR)/usr/bin
   35.14  
   35.15 +.PHONY: clean
   35.16  clean:
   35.17  	$(RM) *.o $(TARGET) *~
   35.18  
    36.1 --- a/tools/misc/nsplitd/Makefile	Mon Apr 10 18:17:54 2006 +0100
    36.2 +++ b/tools/misc/nsplitd/Makefile	Mon Apr 10 18:18:03 2006 +0100
    36.3 @@ -8,10 +8,13 @@ OBJS     = $(patsubst %.c,%.o,$(wildcard
    36.4  
    36.5  TARGET   = nsplitd
    36.6  
    36.7 +.PHONY: all
    36.8  all: $(TARGET)
    36.9  
   36.10 +.PHONY: install
   36.11  install: all
   36.12  
   36.13 +.PHONY: clean
   36.14  clean:
   36.15  	$(RM) *.o $(TARGET) *~
   36.16  
    37.1 --- a/tools/pygrub/Makefile	Mon Apr 10 18:17:54 2006 +0100
    37.2 +++ b/tools/pygrub/Makefile	Mon Apr 10 18:18:03 2006 +0100
    37.3 @@ -2,10 +2,13 @@
    37.4  XEN_ROOT = ../..
    37.5  include $(XEN_ROOT)/tools/Rules.mk
    37.6  
    37.7 +.PHONY: all
    37.8  all: build
    37.9 +.PHONY: build
   37.10  build:
   37.11  	CFLAGS="$(CFLAGS)" python setup.py build
   37.12  
   37.13 +.PHONY: install
   37.14  ifndef XEN_PYTHON_NATIVE_INSTALL
   37.15  install: all
   37.16  	CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr"
   37.17 @@ -14,5 +17,6 @@ install: all
   37.18  	CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)"
   37.19  endif
   37.20  
   37.21 +.PHONY: clean
   37.22  clean:
   37.23 -	rm -rf build tmp *.pyc *.pyo *.o *.a *~
   37.24 +	rm -rf build tmp *.pyc *.pyo *.o *.a *~ a.out
    38.1 --- a/tools/python/Makefile	Mon Apr 10 18:17:54 2006 +0100
    38.2 +++ b/tools/python/Makefile	Mon Apr 10 18:18:03 2006 +0100
    38.3 @@ -1,12 +1,14 @@
    38.4  XEN_ROOT = ../..
    38.5  include $(XEN_ROOT)/tools/Rules.mk
    38.6  
    38.7 -.PHONY: all build install clean
    38.8 +.PHONY: all
    38.9 +all: build
   38.10  
   38.11 -all: build
   38.12 +.PHONY: build
   38.13  build:
   38.14  	CFLAGS="$(CFLAGS)" python setup.py build
   38.15  
   38.16 +.PHONY: install
   38.17  ifndef XEN_PYTHON_NATIVE_INSTALL
   38.18  install: all
   38.19  	CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --force
   38.20 @@ -15,8 +17,10 @@ install: all
   38.21  	CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
   38.22  endif
   38.23  
   38.24 +.PHONY: test
   38.25  test:
   38.26  	export LD_LIBRARY_PATH=$$(readlink -f ../libxc):$$(readlink -f ../xenstore); python test.py -b -u
   38.27  
   38.28 +.PHONY: clean
   38.29  clean:
   38.30  	rm -rf build *.pyc *.pyo *.o *.a *~
    39.1 --- a/tools/security/Makefile	Mon Apr 10 18:17:54 2006 +0100
    39.2 +++ b/tools/security/Makefile	Mon Apr 10 18:18:03 2006 +0100
    39.3 @@ -54,8 +54,10 @@ ACM_POLICY_SUFFIX = security_policy.xml
    39.4  ACM_LABEL_SUFFIX  = security_label_template.xml
    39.5  
    39.6  ifeq ($(ACM_SECURITY),y)
    39.7 +.PHONY: all
    39.8  all: build
    39.9  
   39.10 +.PHONY: install
   39.11  install: all $(ACM_CONFIG_FILE)
   39.12  	$(INSTALL_DIR) -p $(DESTDIR)/usr/sbin
   39.13  	$(INSTALL_PROG) -p $(ACM_INST_TOOLS) $(DESTDIR)/usr/sbin
   39.14 @@ -79,11 +81,14 @@ else
   39.15  	python python/setup.py install --root="$(DESTDIR)"
   39.16  endif
   39.17  else
   39.18 +.PHONY: all
   39.19  all:
   39.20  
   39.21 +.PHONY: install
   39.22  install:
   39.23  endif
   39.24  
   39.25 +.PHONY: build
   39.26  build: mk-symlinks $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS)
   39.27  	python python/setup.py build
   39.28  	chmod 700 $(ACM_SCRIPTS)
   39.29 @@ -100,6 +105,7 @@ get_decision: $(OBJS_GETD)
   39.30  xensec_gen: xensec_gen.py
   39.31  	cp -f $^ $@
   39.32  
   39.33 +.PHONY: clean
   39.34  clean:
   39.35  	$(RM) $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS)
   39.36  	$(RM) $(ACM_OBJS)
   39.37 @@ -107,8 +113,10 @@ clean:
   39.38  	$(RM) -r xen
   39.39  	$(RM) -r build
   39.40  
   39.41 +.PHONY: mrproper
   39.42  mrproper: clean
   39.43  
   39.44 +.PHONY: boot_install
   39.45  boot_install: install
   39.46  	$(ACM_SCRIPT_DIR)/updategrub.sh $(POLICY) $(KERNEL_VERSION)
   39.47  
    40.1 --- a/tools/sv/Makefile	Mon Apr 10 18:17:54 2006 +0100
    40.2 +++ b/tools/sv/Makefile	Mon Apr 10 18:18:03 2006 +0100
    40.3 @@ -1,2 +1,3 @@
    40.4  
    40.5 +.PHONY: all
    40.6  all:
    41.1 --- a/tools/tests/Makefile	Mon Apr 10 18:17:54 2006 +0100
    41.2 +++ b/tools/tests/Makefile	Mon Apr 10 18:18:03 2006 +0100
    41.3 @@ -6,14 +6,17 @@ TARGET := test_x86_emulator
    41.4  
    41.5  HOSTCFLAGS += -D__TEST_HARNESS__
    41.6  
    41.7 +.PHONY: all
    41.8  all: $(TARGET)
    41.9  
   41.10  $(TARGET): x86_emulate.o test_x86_emulator.o
   41.11  	$(HOSTCC) -o $@ $^
   41.12  
   41.13 +.PHONY: clean
   41.14  clean:
   41.15  	rm -rf $(TARGET) *.o *~ core
   41.16  
   41.17 +.PHONY: install
   41.18  install:
   41.19  
   41.20  x86_emulate.o: $(XEN_ROOT)/xen/arch/x86/x86_emulate.c
    42.1 --- a/tools/vnet/Makefile	Mon Apr 10 18:17:54 2006 +0100
    42.2 +++ b/tools/vnet/Makefile	Mon Apr 10 18:18:03 2006 +0100
    42.3 @@ -5,10 +5,6 @@ export VNET_ROOT = $(shell pwd)
    42.4  include $(VNET_ROOT)/Make.env
    42.5  endif
    42.6  
    42.7 -.PHONY: all compile install dist clean pristine
    42.8 -.PHONY: gc-all gc-install gc-clean
    42.9 -.PHONY: help
   42.10 -
   42.11  SUBDIRS:=
   42.12  SUBDIRS+= examples
   42.13  SUBDIRS+= scripts
   42.14 @@ -17,11 +13,13 @@ SUBDIRS+= libxutil
   42.15  SUBDIRS+= vnetd
   42.16  SUBDIRS+= vnet-module
   42.17  
   42.18 +.PHONY: all
   42.19  all: compile
   42.20  
   42.21  gc.tar.gz:
   42.22  	wget http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/$@
   42.23  
   42.24 +.PHONY: gc
   42.25  gc: gc.tar.gz
   42.26  	tar xfz gc.tar.gz
   42.27  	ln -sf gc?.? gc
   42.28 @@ -31,10 +29,13 @@ gc: gc.tar.gz
   42.29  	make -C gc
   42.30  	DESTDIR="" make -C gc install
   42.31  
   42.32 +.PHONY: gc-all
   42.33  gc-all: $(GC_LIB_A)
   42.34  
   42.35 +.PHONY: gc-install
   42.36  gc-install:
   42.37  
   42.38 +.PHONY: gc-clean
   42.39  gc-clean:
   42.40  	-@$(RM) -r gc?.? gc
   42.41  
   42.42 @@ -50,19 +51,25 @@ subtgt = $(patsubst %,%-$(1),$(SUBDIRS))
   42.43  %-install:
   42.44  	$(call submak,install)
   42.45  
   42.46 +.PHONY: compile
   42.47  compile: $(call subtgt,all)
   42.48  
   42.49 +.PHONY: install
   42.50  install: DESTDIR=
   42.51  install: dist
   42.52  
   42.53 +.PHONY: dist
   42.54  dist: compile $(call subtgt,install)
   42.55  
   42.56 +.PHONY: clean
   42.57  clean: $(call subtgt,clean)
   42.58  	-@$(RM) -r build
   42.59  
   42.60 +.PHONY: pristine
   42.61  pristine: clean
   42.62  	-@$(RM) gc.tar.gz
   42.63  
   42.64 +.PHONY: help
   42.65  help:
   42.66  	@echo 'Cleaning targets:'
   42.67  	@echo '  clean     - clean subdirs and remove the build dir'
    43.1 --- a/tools/vnet/doc/Makefile	Mon Apr 10 18:17:54 2006 +0100
    43.2 +++ b/tools/vnet/doc/Makefile	Mon Apr 10 18:18:03 2006 +0100
    43.3 @@ -23,8 +23,10 @@ DOC_MAN5	:= $(patsubst man/%.pod.5,man5/
    43.4  
    43.5  .PHONY: all man clean install
    43.6  
    43.7 +.PHONY: all
    43.8  all: man
    43.9  
   43.10 +.PHONY: man
   43.11  man:
   43.12  	@if which $(POD2MAN) 1>/dev/null 2>/dev/null; then \
   43.13  	$(MAKE) $(DOC_MAN1) $(DOC_MAN5); fi
   43.14 @@ -39,10 +41,12 @@ man5/%.5: man/%.pod.5 Makefile
   43.15  	$(POD2MAN) --release=$(VERSION) --name=`echo $@ | sed 's/^man5.//'| \
   43.16  		sed 's/.5//'` -s 5 -c $(HEADER) $< $@
   43.17  
   43.18 +.PHONY: clean
   43.19  clean:
   43.20  	@$(RM) -rf man5
   43.21  	@$(RM) -rf man1
   43.22  
   43.23 +.PHONY:  install
   43.24   install: all
   43.25  	$(INSTALL_DIR) $(DESTDIR)$(MAN_DIR)
   43.26  	$(CP) -dR man1 $(DESTDIR)$(MAN_DIR)
    44.1 --- a/tools/vnet/examples/Makefile	Mon Apr 10 18:17:54 2006 +0100
    44.2 +++ b/tools/vnet/examples/Makefile	Mon Apr 10 18:18:03 2006 +0100
    44.3 @@ -7,13 +7,14 @@ INSTALL_DIR	= $(INSTALL) -d -m0755
    44.4  
    44.5  XEN_SCRIPT_DIR  = $(DESTDIR)/etc/xen/scripts
    44.6  
    44.7 -.PHONY: all install clean
    44.8 -
    44.9 +.PHONY: all
   44.10  all:
   44.11  
   44.12 +.PHONY: install
   44.13  install:
   44.14  	$(INSTALL_DIR) $(XEN_SCRIPT_DIR)
   44.15  	$(INSTALL_PROG) network-vnet $(XEN_SCRIPT_DIR)
   44.16  	$(INSTALL_PROG) vnet-insert $(XEN_SCRIPT_DIR)
   44.17  
   44.18 -clean:
   44.19 \ No newline at end of file
   44.20 +.PHONY: clean
   44.21 +clean:
    45.1 --- a/tools/vnet/libxutil/Makefile	Mon Apr 10 18:17:54 2006 +0100
    45.2 +++ b/tools/vnet/libxutil/Makefile	Mon Apr 10 18:18:03 2006 +0100
    45.3 @@ -42,8 +42,10 @@ LIB      += libxutil.so.$(MAJOR)
    45.4  LIB      += libxutil.so.$(MAJOR).$(MINOR)
    45.5  LIB      += libxutil.a
    45.6  
    45.7 +.PHONY: all
    45.8  all: build
    45.9  
   45.10 +.PHONY: build
   45.11  build: #check-for-zlib
   45.12  	$(MAKE) $(LIB)
   45.13  
   45.14 @@ -61,6 +63,7 @@ libxutil.so.$(MAJOR).$(MINOR): $(PIC_OBJ
   45.15  libxutil.a: $(LIB_OBJS)
   45.16  	$(AR) rc $@ $^
   45.17  
   45.18 +.PHONY: check-for-zlib
   45.19  check-for-zlib:
   45.20  	@if [ ! -e /usr/include/zlib.h ]; then \
   45.21  	echo "***********************************************************"; \
   45.22 @@ -69,6 +72,7 @@ check-for-zlib:
   45.23  	false; \
   45.24  	fi
   45.25  
   45.26 +.PHONY: install
   45.27  install: build
   45.28  	[ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
   45.29  	$(INSTALL_PROG) libxutil.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
   45.30 @@ -76,6 +80,7 @@ install: build
   45.31  	ln -sf libxutil.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxutil.so.$(MAJOR)
   45.32  	ln -sf libxutil.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxutil.so
   45.33  
   45.34 +.PHONY: clean
   45.35  clean:
   45.36  	-@$(RM) *.a *.so* *.o *.opic *.rpm 
   45.37  	-@$(RM) *~
    46.1 --- a/tools/vnet/scripts/Makefile	Mon Apr 10 18:17:54 2006 +0100
    46.2 +++ b/tools/vnet/scripts/Makefile	Mon Apr 10 18:18:03 2006 +0100
    46.3 @@ -7,12 +7,13 @@ INSTALL_DIR	= $(INSTALL) -d -m0755
    46.4  
    46.5  SBIN_DIR        = $(DESTDIR)/usr/sbin
    46.6  
    46.7 -.PHONY: all install clean
    46.8 -
    46.9 +.PHONY: all
   46.10  all:
   46.11  
   46.12 +.PHONY: install
   46.13  install:
   46.14  	$(INSTALL_DIR) $(SBIN_DIR)
   46.15  	$(INSTALL_PROG) vn $(SBIN_DIR)
   46.16  
   46.17 -clean:
   46.18 \ No newline at end of file
   46.19 +.PHONY: clean
   46.20 +clean:
    47.1 --- a/tools/vnet/vnetd/Makefile	Mon Apr 10 18:17:54 2006 +0100
    47.2 +++ b/tools/vnet/vnetd/Makefile	Mon Apr 10 18:18:03 2006 +0100
    47.3 @@ -19,6 +19,7 @@
    47.4  VNET_ROOT = $(shell cd .. && pwd)
    47.5  include $(VNET_ROOT)/Make.env
    47.6  
    47.7 +.PHONY: all
    47.8  all: vnetd
    47.9  
   47.10  #----------------------------------------------------------------------------
   47.11 @@ -104,10 +105,12 @@ VNETD_LIBS:= $(GC_LIB_A)
   47.12  vnetd: $(VNETD_OBJ)
   47.13  	$(CC) $(CFLAGS) -o $@ $^ $(VNETD_LIBS) -ldl -lpthread
   47.14  
   47.15 +.PHONY: install
   47.16  install: vnetd
   47.17  	mkdir -p $(DESTDIR)$(VNETD_INSTALL_DIR)
   47.18  	install -m 0755 vnetd $(DESTDIR)$(VNETD_INSTALL_DIR)
   47.19  
   47.20 +.PHONY: clean
   47.21  clean:
   47.22  	-@$(RM) *.a *.o *~
   47.23  	-@$(RM) vnetd
    48.1 --- a/tools/vtpm/Makefile	Mon Apr 10 18:17:54 2006 +0100
    48.2 +++ b/tools/vtpm/Makefile	Mon Apr 10 18:18:03 2006 +0100
    48.3 @@ -13,14 +13,18 @@ TPM_EMULATOR_TARFILE = tpm_emulator-0.2b
    48.4  
    48.5  GMP_HEADER = /usr/include/gmp.h
    48.6  
    48.7 +.PHONY: all
    48.8  all: build
    48.9  
   48.10 +.PHONY: build
   48.11  build: $(TPM_EMULATOR_DIR) $(VTPM_DIR) build_sub
   48.12  
   48.13 +.PHONY: install
   48.14  install: build
   48.15  	$(MAKE) -C $(TPM_EMULATOR_DIR) $@
   48.16  	$(MAKE) -C $(VTPM_DIR) $@
   48.17  
   48.18 +.PHONY: clean
   48.19  clean:
   48.20  	@if [ -d $(TPM_EMULATOR_DIR) ]; \
   48.21  		then $(MAKE) -C $(TPM_EMULATOR_DIR) clean; \
   48.22 @@ -29,6 +33,7 @@ clean:
   48.23  		then $(MAKE) -C $(VTPM_DIR) clean; \
   48.24  	fi
   48.25  
   48.26 +.PHONY: mrproper
   48.27  mrproper:
   48.28  	rm -f $(TPM_EMULATOR_TARFILE)
   48.29  	rm -rf $(TPM_EMULATOR_DIR)
   48.30 @@ -58,6 +63,7 @@ mrproper:
   48.31  	patch -p1 < ../tpm_emulator-0.2b-x86_64.patch; \
   48.32  	patch -p1 <../vtpm.patch
   48.33  
   48.34 +.PHONY: build_sub
   48.35  build_sub:
   48.36  	@if [ -e $(GMP_HEADER) ]; then \
   48.37  		$(MAKE) -C $(VTPM_DIR); \
    49.1 --- a/tools/vtpm_manager/Makefile	Mon Apr 10 18:17:54 2006 +0100
    49.2 +++ b/tools/vtpm_manager/Makefile	Mon Apr 10 18:18:03 2006 +0100
    49.3 @@ -6,8 +6,10 @@ include $(XEN_ROOT)/tools/vtpm_manager/R
    49.4  SUBDIRS		= crypto tcs util manager
    49.5  OPENSSL_HEADER	= /usr/include/openssl/crypto.h
    49.6  
    49.7 +.PHONY: all
    49.8  all: build
    49.9  
   49.10 +.PHONY: build
   49.11  build:
   49.12  	@if [ -e $(OPENSSL_HEADER) ]; then \
   49.13  		@set -e; for subdir in $(SUBDIRS); do \
   49.14 @@ -17,17 +19,20 @@ build:
   49.15  		echo "*** Cannot build vtpm_manager: OpenSSL developement files missing."; \
   49.16  	fi
   49.17  
   49.18 +.PHONY: install
   49.19  install: build
   49.20  	@set -e; for subdir in $(SUBDIRS); do \
   49.21  		$(MAKE) -C $$subdir $@; \
   49.22  	done
   49.23  
   49.24 +.PHONY: clean
   49.25  clean:
   49.26  	@set -e; for subdir in $(SUBDIRS); do \
   49.27  		$(MAKE) -C $$subdir $@; \
   49.28  	done
   49.29  
   49.30  
   49.31 +.PHONY: mrproper
   49.32  mrproper:
   49.33  	@set -e; for subdir in $(SUBDIRS); do \
   49.34  		$(MAKE) -C $$subdir $@; \
    50.1 --- a/tools/vtpm_manager/crypto/Makefile	Mon Apr 10 18:17:54 2006 +0100
    50.2 +++ b/tools/vtpm_manager/crypto/Makefile	Mon Apr 10 18:18:03 2006 +0100
    50.3 @@ -3,15 +3,20 @@ include $(XEN_ROOT)/tools/vtpm_manager/R
    50.4  
    50.5  BIN		= libtcpaCrypto.a
    50.6  
    50.7 +.PHONY: all
    50.8  all: build
    50.9  
   50.10 +.PHONY: build
   50.11  build: $(BIN)
   50.12  
   50.13 +.PHONY: install
   50.14  install: build
   50.15  
   50.16 +.PHONY: clean
   50.17  clean:
   50.18  	rm -f *.a *.so *.o *.rpm $(DEP_FILES)
   50.19  
   50.20 +.PHONY: mrproper
   50.21  mrproper: clean
   50.22  	rm -f *~
   50.23  
    51.1 --- a/tools/vtpm_manager/manager/Makefile	Mon Apr 10 18:17:54 2006 +0100
    51.2 +++ b/tools/vtpm_manager/manager/Makefile	Mon Apr 10 18:18:03 2006 +0100
    51.3 @@ -3,19 +3,24 @@ include $(XEN_ROOT)/tools/vtpm_manager/R
    51.4  
    51.5  BIN		= vtpm_managerd
    51.6  
    51.7 +.PHONY: all
    51.8  all: build
    51.9  
   51.10 +.PHONY: build
   51.11  build: $(BIN)
   51.12  
   51.13 +.PHONY: install
   51.14  install: build
   51.15  	if [ ! -d "$(DESTDIR)/var/vtpm/fifos" ]; \
   51.16  		then mkdir -p $(DESTDIR)/var/vtpm/fifos; \
   51.17  	fi
   51.18  	$(INSTALL_PROG) $(BIN) $(TOOLS_INSTALL_DIR)
   51.19  
   51.20 +.PHONY: clean
   51.21  clean:
   51.22  	rm -f *.a *.so *.o *.rpm $(DEP_FILES)
   51.23  
   51.24 +.PHONY: mrproper
   51.25  mrproper: clean
   51.26  	rm -f $(BIN) *~
   51.27  
    52.1 --- a/tools/vtpm_manager/tcs/Makefile	Mon Apr 10 18:17:54 2006 +0100
    52.2 +++ b/tools/vtpm_manager/tcs/Makefile	Mon Apr 10 18:18:03 2006 +0100
    52.3 @@ -3,15 +3,20 @@ include $(XEN_ROOT)/tools/vtpm_manager/R
    52.4  
    52.5  BIN		= libTCS.a
    52.6  
    52.7 +.PHONY: all
    52.8  all: build
    52.9  
   52.10 +.PHONY: build
   52.11  build: $(BIN)
   52.12  
   52.13 +.PHONY: install
   52.14  install: build
   52.15  
   52.16 +.PHONY: clean
   52.17  clean:
   52.18  	rm -f *.a *.so *.o *.rpm $(DEP_FILES)
   52.19  
   52.20 +.PHONY: mrproper
   52.21  mrproper: clean
   52.22  	rm -f *~
   52.23  
    53.1 --- a/tools/vtpm_manager/util/Makefile	Mon Apr 10 18:17:54 2006 +0100
    53.2 +++ b/tools/vtpm_manager/util/Makefile	Mon Apr 10 18:18:03 2006 +0100
    53.3 @@ -3,15 +3,20 @@ include $(XEN_ROOT)/tools/vtpm_manager/R
    53.4  
    53.5  BIN		= libTCGUtils.a
    53.6  
    53.7 +.PHONY: all
    53.8  all: build
    53.9  
   53.10 +.PHONY: build
   53.11  build: $(BIN)
   53.12  
   53.13 +.PHONY: install
   53.14  install: build
   53.15  
   53.16 +.PHONY: clean
   53.17  clean:
   53.18  	rm -f *.a *.so *.o *.rpm $(DEP_FILES)
   53.19  
   53.20 +.PHONY: mrproper
   53.21  mrproper: clean
   53.22  	rm -f *~
   53.23  
    54.1 --- a/tools/xcutils/Makefile	Mon Apr 10 18:17:54 2006 +0100
    54.2 +++ b/tools/xcutils/Makefile	Mon Apr 10 18:18:03 2006 +0100
    54.3 @@ -32,6 +32,8 @@ LDLIBS			= -L$(XEN_LIBXC) -lxenguest -lx
    54.4  
    54.5  .PHONY: all
    54.6  all: build
    54.7 +
    54.8 +.PHONY: build
    54.9  build: $(PROGRAMS)
   54.10  
   54.11  $(PROGRAMS): %: %.o
   54.12 @@ -44,6 +46,7 @@ install: build
   54.13  	$(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(PROGRAMS_INSTALL_DIR)
   54.14  
   54.15  
   54.16 +.PHONY: clean
   54.17  clean:
   54.18  	$(RM) *.o $(PROGRAMS)
   54.19  	$(RM) $(PROG_DEP)
    55.1 --- a/tools/xenmon/Makefile	Mon Apr 10 18:17:54 2006 +0100
    55.2 +++ b/tools/xenmon/Makefile	Mon Apr 10 18:18:03 2006 +0100
    55.3 @@ -28,16 +28,20 @@ LDFLAGS += -L $(XEN_LIBXC)
    55.4  BIN = setmask xenbaked
    55.5  SCRIPTS = xenmon.py
    55.6  
    55.7 +.PHONY: all
    55.8  all: build
    55.9  
   55.10 +.PHONY: build
   55.11  build: $(BIN)
   55.12  
   55.13 +.PHONY: install
   55.14  install: xenbaked setmask
   55.15  	[ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir)
   55.16  	$(INSTALL_PROG) xenbaked $(DESTDIR)$(sbindir)/xenbaked
   55.17  	$(INSTALL_PROG) setmask  $(DESTDIR)$(sbindir)/setmask
   55.18  	$(INSTALL_PROG) xenmon.py  $(DESTDIR)$(sbindir)/xenmon.py
   55.19  
   55.20 +.PHONY: clean
   55.21  clean:
   55.22  	rm -f $(BIN)
   55.23  
    56.1 --- a/tools/xenstat/libxenstat/Makefile	Mon Apr 10 18:17:54 2006 +0100
    56.2 +++ b/tools/xenstat/libxenstat/Makefile	Mon Apr 10 18:18:03 2006 +0100
    56.3 @@ -41,6 +41,7 @@ WARN_FLAGS=-Wall -Werror
    56.4  CFLAGS+=-Isrc -I$(XEN_LIBXC) -I$(XEN_XENSTORE)
    56.5  LDFLAGS+=-Lsrc
    56.6  
    56.7 +.PHONY: all
    56.8  all: $(LIB)
    56.9  
   56.10  $(LIB): $(OBJECTS)
   56.11 @@ -62,6 +63,7 @@ src/libxenstat.so.$(MAJOR): $(LIB)
   56.12  src/libxenstat.so: src/libxenstat.so.$(MAJOR)
   56.13  	$(MAKE_LINK) $(<F) $@
   56.14  
   56.15 +.PHONY: install
   56.16  install: all
   56.17  #install: all
   56.18  #	$(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(includedir)/xenstat.h
   56.19 @@ -84,6 +86,7 @@ BINDINGS=$(PYLIB) $(PYMOD) $(PERLLIB) $(
   56.20  BINDINGSRC=$(PYSRC) $(PERLSRC)
   56.21  
   56.22  # The all-bindings target builds all the language bindings
   56.23 +.PHONY: all-bindings
   56.24  all-bindings: perl-bindings python-bindings
   56.25  
   56.26  # The install-bindings target installs all the language bindings
   56.27 @@ -110,6 +113,7 @@ install-python-bindings: $(PYLIB) $(PYMO
   56.28  	$(INSTALL_PROG) $(PYMOD) $(DESTDIR)$(pythonlibdir)/xenstat.py
   56.29  
   56.30  ifeq ($(XENSTAT_PYTHON_BINDINGS),y)
   56.31 +.PHONY: all
   56.32  all: python-bindings
   56.33  install: install-python-bindings
   56.34  endif
   56.35 @@ -122,8 +126,10 @@ PERL_FLAGS=`perl -MConfig -e 'print "$$C
   56.36  $(PERLLIB): $(PERLSRC)
   56.37  	$(CC) $(CFLAGS) $(LDFLAGS) $(PERL_FLAGS) -shared -lxenstat -o $@ $<
   56.38  
   56.39 +.PHONY: perl-bindings
   56.40  perl-bindings: $(PERLLIB) $(PERLMOD)
   56.41  
   56.42 +.PHONY: install-perl-bindings
   56.43  perllibdir=$(prefix)/lib/perl5
   56.44  perlmoddir=$(prefix)/share/perl5
   56.45  install-perl-bindings: $(PERLLIB) $(PERLMOD)
   56.46 @@ -131,10 +137,14 @@ install-perl-bindings: $(PERLLIB) $(PERL
   56.47  	$(INSTALL_PROG) $(PERLMOD) $(DESTDIR)$(perlmoddir)/xenstat.pm
   56.48  
   56.49  ifeq ($(XENSTAT_PERL_BINDINGS),y)
   56.50 +.PHONY: all
   56.51  all: perl-bindings
   56.52 +
   56.53 +.PHONY: install
   56.54  install: install-perl-bindings
   56.55  endif
   56.56  
   56.57 +.PHONY: clean
   56.58  clean:
   56.59  	rm -f $(LIB) $(SHLIB) $(SHLIB_LINKS) $(OBJECTS) \
   56.60  	      $(BINDINGS) $(BINDINGSRC)
    57.1 --- a/tools/xenstat/xentop/Makefile	Mon Apr 10 18:17:54 2006 +0100
    57.2 +++ b/tools/xenstat/xentop/Makefile	Mon Apr 10 18:18:03 2006 +0100
    57.3 @@ -14,6 +14,7 @@ XEN_ROOT=../../..
    57.4  include $(XEN_ROOT)/tools/Rules.mk
    57.5  
    57.6  ifneq ($(XENSTAT_XENTOP),y)
    57.7 +.PHONY: all install xentop
    57.8  all install xentop:
    57.9  else
   57.10  
   57.11 @@ -30,15 +31,19 @@ CFLAGS += -DGCC_PRINTF -Wall -Werror -I$
   57.12  LDFLAGS += -L$(XEN_LIBXENSTAT)
   57.13  LDLIBS += -lxenstat -lncurses
   57.14  
   57.15 +.PHONY: all
   57.16  all: xentop
   57.17  
   57.18 +.PHONY: xentop
   57.19  xentop: xentop.o
   57.20  
   57.21 +.PHONY: install
   57.22  install: xentop xentop.1
   57.23  	$(INSTALL_PROG) xentop $(DESTDIR)$(sbindir)/xentop
   57.24  	$(INSTALL_DATA) xentop.1 $(DESTDIR)$(man1dir)/xentop.1
   57.25  
   57.26  endif
   57.27  
   57.28 +.PHONY: clean
   57.29  clean:
   57.30  	rm -f xentop xentop.o
    58.1 --- a/tools/xenstore/Makefile	Mon Apr 10 18:17:54 2006 +0100
    58.2 +++ b/tools/xenstore/Makefile	Mon Apr 10 18:18:03 2006 +0100
    58.3 @@ -27,11 +27,13 @@ CLIENTS := xenstore-exists xenstore-list
    58.4  CLIENTS += xenstore-write
    58.5  CLIENTS_OBJS := $(patsubst xenstore-%,xenstore_%.o,$(CLIENTS))
    58.6  
    58.7 +.PHONY: all
    58.8  all: libxenstore.so xenstored $(CLIENTS) xs_tdb_dump xenstore-control xenstore-ls
    58.9  
   58.10  test_interleaved_transactions: test_interleaved_transactions.o
   58.11  	$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -L. -lxenstore -o $@
   58.12  
   58.13 +.PHONY: testcode
   58.14  testcode: xs_test xenstored_test xs_random
   58.15  
   58.16  xenstored: xenstored_core.o xenstored_watch.o xenstored_domain.o xenstored_transaction.o xs_lib.o talloc.o utils.o tdb.o hashtable.o
   58.17 @@ -55,14 +57,17 @@ xenstored_test: xenstored_core_test.o xe
   58.18  xs_tdb_dump: xs_tdb_dump.o utils.o tdb.o talloc.o
   58.19  	$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
   58.20  
   58.21 +.PHONY: xs_test xs_random xs_stress xs_crashme
   58.22  xs_test xs_random xs_stress xs_crashme: LDFLAGS+=-lpthread
   58.23  xs_test: xs_test.o xs_lib.o utils.o
   58.24  xs_random: xs_random.o xs_test_lib.o xs_lib.o talloc.o utils.o
   58.25  xs_stress: xs_stress.o xs_test_lib.o xs_lib.o talloc.o utils.o
   58.26  xs_crashme: xs_crashme.o xs_lib.o talloc.o utils.o
   58.27  
   58.28 +.PHONY: speedtest
   58.29  speedtest: speedtest.o xs.o xs_lib.o utils.o talloc.o
   58.30  
   58.31 +.PHONY: check-speed
   58.32  check-speed: speedtest xenstored_test $(TESTDIR)
   58.33  	$(TESTENV) time ./speedtest 100
   58.34  
   58.35 @@ -80,6 +85,7 @@ talloc_test.o: talloc.c
   58.36  libxenstore.so: xs.opic xs_lib.opic
   58.37  	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so -shared -o $@ $^ -lpthread
   58.38  
   58.39 +.PHONY: clean
   58.40  clean: testsuite-clean
   58.41  	rm -f *.o *.opic *.so
   58.42  	rm -f xenstored xs_random xs_stress xs_crashme
   58.43 @@ -87,55 +93,69 @@ clean: testsuite-clean
   58.44  	rm -f $(CLIENTS)
   58.45  	$(RM) $(PROG_DEP)
   58.46  
   58.47 +.PHONY: print-dir
   58.48  print-dir:
   58.49  	@echo -n tools/xenstore: 
   58.50  
   58.51 +.PHONY: print-end
   58.52  print-end:
   58.53  	@echo
   58.54  
   58.55 +.PHONY: check
   58.56  check: print-dir testsuite-fast randomcheck-fast print-end
   58.57  
   58.58 +.PHONY: fullcheck
   58.59  fullcheck: testsuite-run randomcheck stresstest
   58.60  
   58.61  $(TESTDIR):
   58.62  	mkdir $@
   58.63  
   58.64 +.PHONY: testsuite-run
   58.65  testsuite-run: xenstored_test xs_test $(TESTDIR)
   58.66  	$(TESTENV) testsuite/test.sh && echo
   58.67  
   58.68 +.PHONY: testsuite-fast
   58.69  testsuite-fast: xenstored_test xs_test $(TESTDIR)
   58.70  	@$(TESTENV) testsuite/test.sh --fast
   58.71  
   58.72 +.PHONY: testsuite-clean
   58.73  testsuite-clean:
   58.74  	rm -rf $(TESTDIR)
   58.75  
   58.76  # Make this visible so they can see repeat tests without --fast if they
   58.77  # fail.
   58.78  RANDSEED=$(shell date +%s)
   58.79 +.PHONY: randomcheck
   58.80  randomcheck: xs_random xenstored_test $(TESTDIR)
   58.81  	$(TESTENV) ./xs_random --simple --fast /tmp/xs_random 200000 $(RANDSEED) && echo
   58.82  	$(TESTENV) ./xs_random --fast /tmp/xs_random 100000 $(RANDSEED) && echo
   58.83  #	$(TESTENV) ./xs_random --fail /tmp/xs_random 10000 $(RANDSEED)
   58.84  
   58.85 +.PHONY: crashme
   58.86  crashme:  xs_crashme xenstored_test $(TESTDIR)
   58.87  	rm -rf $(TESTDIR)/store $(TESTDIR)/transactions /tmp/xs_crashme.vglog* /tmp/trace
   58.88  	export $(TESTENV); ./xs_crashme 5000 $(RANDSEED) 2>/dev/null
   58.89  	if [ -n "`cat /tmp/xs_crashme.vglog*`" ]; then echo Valgrind complained; cat /tmp/xs_crashme.vglog*; exit 1; fi
   58.90  	rm -rf $(TESTDIR)/store $(TESTDIR)/transactions /tmp/xs_crashme.vglog* /tmp/trace
   58.91  
   58.92 +.PHONY: randomcheck-fast
   58.93  randomcheck-fast: xs_random xenstored_test $(TESTDIR)
   58.94  	@$(TESTENV) ./xs_random --fast /tmp/xs_random 2000 $(RANDSEED)
   58.95  
   58.96 +.PHONY: stresstest
   58.97  stresstest: xs_stress xenstored_test $(TESTDIR)
   58.98  	rm -rf $(TESTDIR)/store $(TESTDIR)/transactions
   58.99  	export $(TESTENV); PID=`./xenstored_test --output-pid --trace-file=/tmp/trace`; ./xs_stress 5000; ret=$$?; kill $$PID; exit $$ret
  58.100  
  58.101 +.PHONY: TAGS
  58.102  TAGS:
  58.103  	etags `find . -name '*.[ch]'`
  58.104  
  58.105 +.PHONY: tarball
  58.106  tarball: clean
  58.107  	cd .. && tar -c -j -v -h -f xenstore.tar.bz2 xenstore/
  58.108  
  58.109 +.PHONY: install
  58.110  install: all
  58.111  	$(INSTALL_DIR) -p $(DESTDIR)/var/run/xenstored
  58.112  	$(INSTALL_DIR) -p $(DESTDIR)/var/lib/xenstored
    59.1 --- a/tools/xentrace/Makefile	Mon Apr 10 18:17:54 2006 +0100
    59.2 +++ b/tools/xentrace/Makefile	Mon Apr 10 18:18:03 2006 +0100
    59.3 @@ -28,9 +28,13 @@ ifeq ($(XEN_TARGET_ARCH),x86_64)
    59.4  LIBBIN  += xenctx
    59.5  endif
    59.6  
    59.7 +.PHONY: all
    59.8  all: build
    59.9 +
   59.10 +.PHONY: build
   59.11  build: $(BIN) $(LIBBIN)
   59.12  
   59.13 +.PHONY: install
   59.14  install: build
   59.15  	[ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
   59.16  	[ -z "$(LIBBIN)" ] || [ -d $(DESTDIR)/usr/$(LIBDIR)/xen/bin ] || \
   59.17 @@ -44,6 +48,7 @@ install: build
   59.18  	$(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/share/man/man1
   59.19  	$(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/share/man/man8
   59.20  
   59.21 +.PHONY: clean
   59.22  clean:
   59.23  	$(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN)
   59.24  
    60.1 --- a/xen/Makefile	Mon Apr 10 18:17:54 2006 +0100
    60.2 +++ b/xen/Makefile	Mon Apr 10 18:18:03 2006 +0100
    60.3 @@ -7,17 +7,21 @@ export XEN_FULLVERSION  := $(XEN_VERSION
    60.4  
    60.5  export BASEDIR := $(CURDIR)
    60.6  
    60.7 +.PHONY: default
    60.8  default: build
    60.9  
   60.10  ifeq ($(XEN_ROOT),)
   60.11  
   60.12 +.PHONY: build install clean
   60.13  build install clean:
   60.14  	make -f Rules.mk $@
   60.15  
   60.16  else
   60.17  
   60.18 +.PHONY: build
   60.19  build: $(TARGET).gz
   60.20  
   60.21 +.PHONY: install
   60.22  install: $(TARGET).gz
   60.23  	[ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
   60.24  	$(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz
   60.25 @@ -31,6 +35,7 @@ install: $(TARGET).gz
   60.26  	$(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
   60.27  	$(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
   60.28  
   60.29 +.PHONY: clean
   60.30  clean:: delete-unfresh-files
   60.31  	$(MAKE) -C tools clean
   60.32  	$(MAKE) -f $(BASEDIR)/Rules.mk -C common clean
   60.33 @@ -43,9 +48,11 @@ clean:: delete-unfresh-files
   60.34  
   60.35  endif
   60.36  
   60.37 +.PHONY: dist
   60.38  dist: install
   60.39  
   60.40 -debug: FORCE
   60.41 +.PHONY: debug
   60.42 +debug:
   60.43  	objdump -D -S $(TARGET)-syms > $(TARGET).s
   60.44  
   60.45  $(TARGET).gz: $(TARGET)
   60.46 @@ -63,6 +70,7 @@ debug: FORCE
   60.47  
   60.48  # drivers/char/console.o contains static banner/compile info. Blow it away.
   60.49  # Don't refresh these files during e.g., 'sudo make install'
   60.50 +.PHONY: delete-unfresh-files
   60.51  delete-unfresh-files:
   60.52  	@if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \
   60.53  		rm -f include/xen/{banner,compile}.h; \
   60.54 @@ -119,8 +127,6 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h
   60.55  	  echo ""; \
   60.56  	  echo "#endif") <$< >$@
   60.57  
   60.58 -.PHONY: default debug build install dist clean delete-unfresh-files TAGS tags
   60.59 -
   60.60  SUBDIRS = acm arch/$(TARGET_ARCH) common drivers 
   60.61  define all_sources
   60.62      ( find include/asm-$(TARGET_ARCH) -name SCCS -prune -o -name '*.h' -print; \
   60.63 @@ -128,12 +134,20 @@ define all_sources
   60.64              -name config \) -prune -o -name '*.h' -print; \
   60.65        find $(SUBDIRS) -name SCCS -prune -o -name '*.[chS]' -print )
   60.66  endef
   60.67 +
   60.68 +.PHONY: TAGS
   60.69  TAGS: 
   60.70  	$(all_sources) | etags -
   60.71 +
   60.72 +.PHONY: tags
   60.73  tags: 
   60.74  	$(all_sources) | xargs ctags
   60.75 +
   60.76 +.PHONY: cscope
   60.77  cscope: 
   60.78  	$(all_sources) > cscope.files
   60.79  	cscope -k -b -q
   60.80 +
   60.81 +.PHONY: MAP
   60.82  MAP:
   60.83  	$(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
    61.1 --- a/xen/Rules.mk	Mon Apr 10 18:17:54 2006 +0100
    61.2 +++ b/xen/Rules.mk	Mon Apr 10 18:18:03 2006 +0100
    61.3 @@ -86,13 +86,15 @@ subdir-all := $(subdir-y) $(subdir-n)
    61.4  built_in.o: $(obj-y)
    61.5  	$(LD) $(LDFLAGS) -r -o $@ $^
    61.6  
    61.7 +# Force execution of pattern rules (for which PHONY cannot be directly used).
    61.8  .PHONY: FORCE
    61.9  FORCE:
   61.10  
   61.11  %/built_in.o: FORCE
   61.12  	$(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o
   61.13  
   61.14 -clean:: $(addprefix _clean_, $(subdir-all)) FORCE
   61.15 +.PHONY: clean
   61.16 +clean:: $(addprefix _clean_, $(subdir-all))
   61.17  	rm -f *.o *~ core
   61.18  _clean_%/: FORCE
   61.19  	$(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean
    62.1 --- a/xen/arch/ia64/Makefile	Mon Apr 10 18:17:54 2006 +0100
    62.2 +++ b/xen/arch/ia64/Makefile	Mon Apr 10 18:18:03 2006 +0100
    62.3 @@ -75,7 +75,8 @@ xen.lds.s: xen/xen.lds.S
    62.4  	$(CC) -E $(CPPFLAGS) -P -DXEN $(AFLAGS) \
    62.5  		-o xen.lds.s xen/xen.lds.S
    62.6  
    62.7 -clean:: FORCE
    62.8 +.PHONY: clean
    62.9 +clean::
   62.10  	rm -f *.o *~ core  xen.lds.s $(BASEDIR)/include/asm-ia64/.offsets.h.stamp asm-offsets.s map.out
   62.11  	rm -f asm-xsi-offsets.s $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h
   62.12  	rm -f $(BASEDIR)/System.map
    63.1 --- a/xen/arch/ia64/tools/privop/Makefile	Mon Apr 10 18:17:54 2006 +0100
    63.2 +++ b/xen/arch/ia64/tools/privop/Makefile	Mon Apr 10 18:18:03 2006 +0100
    63.3 @@ -1,10 +1,13 @@
    63.4  CC=gcc
    63.5  CFLAGS=-O -Wall
    63.6  
    63.7 +.PHONY: all
    63.8  all: postat
    63.9  
   63.10 +.PHONY: postat
   63.11  postat: postat.c pohcalls.o
   63.12  
   63.13 +.PHONY: clean
   63.14  clean:
   63.15  	$(RM) -f *.o postat *.s *~
   63.16  
    64.1 --- a/xen/arch/x86/Makefile	Mon Apr 10 18:17:54 2006 +0100
    64.2 +++ b/xen/arch/x86/Makefile	Mon Apr 10 18:18:03 2006 +0100
    64.3 @@ -77,5 +77,6 @@ boot/mkelf32: boot/mkelf32.c
    64.4  
    64.5  shadow_guest32.o: shadow.c
    64.6  
    64.7 -clean:: FORCE
    64.8 +.PHONY: clean
    64.9 +clean::
   64.10  	rm -f asm-offsets.s xen.lds boot/*.o boot/*~ boot/core boot/mkelf32
    65.1 --- a/xen/include/asm-x86/config.h	Mon Apr 10 18:17:54 2006 +0100
    65.2 +++ b/xen/include/asm-x86/config.h	Mon Apr 10 18:18:03 2006 +0100
    65.3 @@ -65,8 +65,13 @@
    65.4  
    65.5  #define barrier() __asm__ __volatile__("": : :"memory")
    65.6  
    65.7 +/* A power-of-two value greater than or equal to number of hypercalls. */
    65.8  #define NR_hypercalls 32
    65.9  
   65.10 +#if NR_hypercalls & (NR_hypercalls - 1)
   65.11 +#error "NR_hypercalls must be a power-of-two value"
   65.12 +#endif
   65.13 +
   65.14  #ifndef NDEBUG
   65.15  #define MEMORY_GUARD
   65.16  #ifdef __x86_64__
    66.1 --- a/xen/tools/Makefile	Mon Apr 10 18:17:54 2006 +0100
    66.2 +++ b/xen/tools/Makefile	Mon Apr 10 18:18:03 2006 +0100
    66.3 @@ -1,13 +1,16 @@
    66.4  
    66.5  include $(BASEDIR)/../Config.mk
    66.6  
    66.7 +.PHONY: default
    66.8  default:
    66.9  	$(MAKE) -C figlet
   66.10  	$(MAKE) symbols
   66.11  
   66.12 +.PHONY: clean
   66.13  clean:
   66.14  	$(MAKE) -C figlet clean
   66.15  	rm -f *.o symbols
   66.16  
   66.17 +.PHONY: symbols
   66.18  symbols: symbols.c
   66.19  	$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
    67.1 --- a/xen/tools/figlet/Makefile	Mon Apr 10 18:17:54 2006 +0100
    67.2 +++ b/xen/tools/figlet/Makefile	Mon Apr 10 18:18:03 2006 +0100
    67.3 @@ -4,5 +4,6 @@ include $(BASEDIR)/../Config.mk
    67.4  figlet: figlet.c
    67.5  	$(HOSTCC) -o $@ $<
    67.6  
    67.7 +.PHONY: clean
    67.8  clean:
    67.9  	rm -f *.o figlet