ia64/xen-unstable

changeset 3519:074d7606fd61

bitkeeper revision 1.1159.212.34 (41f5a289J4SAf6zaQUhGEBrQWQ14dA)

manual merge
author iap10@freefall.cl.cam.ac.uk
date Tue Jan 25 01:36:09 2005 +0000 (2005-01-25)
parents c384de5ff937 30d3c3a3018d
children 89da70a626a7 8f5003f54216
files .rootkeys BitKeeper/etc/ignore BitKeeper/etc/logging_ok Makefile buildconfigs/mk.linux-2.4-xen0 buildconfigs/mk.linux-2.4-xenU buildconfigs/mk.linux-2.6-xen0 buildconfigs/mk.linux-2.6-xenU docs/Makefile install.sh linux-2.4.29-xen-sparse/mkbuildtree linux-2.6.10-xen-sparse/mkbuildtree netbsd-2.0-xen-sparse/mkbuildtree tools/Makefile tools/examples/Makefile tools/examples/init.d/xend tools/examples/network tools/libxc/Makefile tools/libxutil/Makefile tools/misc/Makefile tools/misc/miniterm/Makefile tools/python/Makefile tools/python/xen/sv/params.py tools/python/xen/xend/XendRoot.py tools/python/xen/xend/server/SrvServer.py tools/python/xen/xend/sxp.py tools/sv/Makefile tools/xentrace/Makefile tools/xfrd/Makefile xen/Makefile xen/arch/x86/Makefile xen/common/Makefile xen/drivers/acpi/Makefile xen/drivers/char/Makefile xen/drivers/pci/Makefile xen/include/xen/banner.h xen/include/xen/compile.h.in
line diff
     1.1 --- a/.rootkeys	Mon Jan 24 17:35:09 2005 +0000
     1.2 +++ b/.rootkeys	Tue Jan 25 01:36:09 2005 +0000
     1.3 @@ -1059,7 +1059,9 @@ 404f3d2eR2Owk-ZcGOx9ULGHg3nrww xen/inclu
     1.4  3ddb79c25UE59iu4JJcbRalx95mvcg xen/include/public/xen.h
     1.5  3e397e66m2tO3s-J8Jnr7Ws_tGoPTg xen/include/xen/ac_timer.h
     1.6  40715b2epYl2jBbxzz9CI2rgIca7Zg xen/include/xen/acpi.h
     1.7 +41f2cea7ZvnB9JC4qkiq1K8H7xJw5Q xen/include/xen/banner.h
     1.8  3ddb79c0c0cX_DZE209-Bb-Rx1v-Aw xen/include/xen/cache.h
     1.9 +41f2cea7Yna7xc0X9fyavIjoSFFeVg xen/include/xen/compile.h.in
    1.10  3f840f12CkbYSlwMrY2S11Mpyxg7Nw xen/include/xen/compiler.h
    1.11  3ddb79c259jh8hE7vre_8NuE7nwNSA xen/include/xen/config.h
    1.12  3eb165e0eawr3R-p2ZQtSdLWtLRN_A xen/include/xen/console.h
     2.1 --- a/BitKeeper/etc/ignore	Mon Jan 24 17:35:09 2005 +0000
     2.2 +++ b/BitKeeper/etc/ignore	Tue Jan 25 01:36:09 2005 +0000
     2.3 @@ -1,6 +1,7 @@
     2.4  *.a
     2.5  *.d
     2.6  *.o
     2.7 +*.opic
     2.8  *.pyc
     2.9  *.so
    2.10  *.so.*
    2.11 @@ -20,9 +21,29 @@ docs/*.log
    2.12  docs/*.pdf
    2.13  docs/*.ps
    2.14  docs/*.toc
    2.15 +docs/figs/xenserver.eps
    2.16  docs/html/*
    2.17 +docs/interface/WARNINGS
    2.18 +docs/interface/images.pl
    2.19 +docs/interface/images.tex
    2.20 +docs/interface/img1.png
    2.21 +docs/interface/index.html
    2.22 +docs/interface/interface.css
    2.23 +docs/interface/interface.html
    2.24 +docs/interface/labels.pl
    2.25  docs/pdf/*
    2.26  docs/ps/*
    2.27 +docs/user/WARNINGS
    2.28 +docs/user/images.pl
    2.29 +docs/user/images.tex
    2.30 +docs/user/img1.png
    2.31 +docs/user/img2.png
    2.32 +docs/user/img3.png
    2.33 +docs/user/index.html
    2.34 +docs/user/internals.pl
    2.35 +docs/user/labels.pl
    2.36 +docs/user/user.css
    2.37 +docs/user/user.html
    2.38  extras/mini-os/h/hypervisor-ifs
    2.39  install/*
    2.40  linux-*-xen0/*
    2.41 @@ -55,9 +76,9 @@ tools/vnet/vnet-module/vnet_module.mod.*
    2.42  tools/vnetd/vnetd
    2.43  tools/web-shutdown.tap
    2.44  tools/x2d2/minixend
    2.45 -tools/xentrace/xentrace
    2.46  tools/xcs/xcs
    2.47  tools/xcs/xcsdump
    2.48 +tools/xentrace/xentrace
    2.49  tools/xfrd/xfrd
    2.50  xen/BLOG
    2.51  xen/arch/x86/asm-offsets.s
     3.1 --- a/BitKeeper/etc/logging_ok	Mon Jan 24 17:35:09 2005 +0000
     3.2 +++ b/BitKeeper/etc/logging_ok	Tue Jan 25 01:36:09 2005 +0000
     3.3 @@ -20,6 +20,7 @@ gm281@tetrapod.cl.cam.ac.uk
     3.4  iap10@freefall.cl.cam.ac.uk
     3.5  iap10@labyrinth.cl.cam.ac.uk
     3.6  iap10@nidd.cl.cam.ac.uk
     3.7 +iap10@pb007.cl.cam.ac.uk
     3.8  iap10@striker.cl.cam.ac.uk
     3.9  iap10@tetris.cl.cam.ac.uk
    3.10  jws22@gauntlet.cl.cam.ac.uk
     4.1 --- a/Makefile	Mon Jan 24 17:35:09 2005 +0000
     4.2 +++ b/Makefile	Tue Jan 25 01:36:09 2005 +0000
     4.3 @@ -2,8 +2,13 @@
     4.4  # Grand Unified Makefile for Xen.
     4.5  #
     4.6  
     4.7 -DIST_DIR    ?= $(shell pwd)/dist
     4.8 -INSTALL_DIR ?= $(DIST_DIR)/install
     4.9 +DIST_DIR	:= $(CURDIR)/dist
    4.10 +DESTDIR		:= $(DIST_DIR)/install
    4.11 +
    4.12 +INSTALL		:= install
    4.13 +INSTALL_DIR	:= $(INSTALL) -d -m0755
    4.14 +INSTALL_DATA	:= $(INSTALL) -m0644
    4.15 +INSTALL_PROG	:= $(INSTALL) -m0755
    4.16  
    4.17  KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
    4.18  # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
    4.19 @@ -14,7 +19,7 @@ ALLSPARSETREES = $(patsubst %-xen-sparse
    4.20  XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
    4.21  
    4.22  
    4.23 -export INSTALL_DIR
    4.24 +export DESTDIR
    4.25  
    4.26  include buildconfigs/Rules.mk
    4.27  
    4.28 @@ -35,34 +40,36 @@ install-tools:
    4.29  	$(MAKE) -C tools install
    4.30  
    4.31  install-kernels:
    4.32 -	$(shell cp -a $(INSTALL_DIR)/boot/* /boot/)
    4.33 -	$(shell cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/)
    4.34 -	$(shell cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/)
    4.35 -	$(shell cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/)
    4.36 +	cp -a $(INSTALL_DIR)/boot/* /boot/
    4.37 +	cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/
    4.38 +	cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/
    4.39 +	cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/
    4.40  
    4.41  install-docs:
    4.42  	sh ./docs/check_pkgs && $(MAKE) -C docs install || true
    4.43 +	sh ./docs/check_pkgs
    4.44 +	-$(MAKE) -C docs install
    4.45  
    4.46  # build and install everything into local dist directory
    4.47  dist: xen tools kernels docs
    4.48 -	install -m0644 ./COPYING $(DIST_DIR)
    4.49 -	install -m0644 ./README $(DIST_DIR)
    4.50 -	install -m0755 ./install.sh $(DIST_DIR)
    4.51 -	mkdir -p $(DIST_DIR)/check
    4.52 -	install -m0755 tools/check/chk tools/check/check_* $(DIST_DIR)/check
    4.53 +	$(INSTALL_DIR) $(DIST_DIR)/check
    4.54 +	$(INSTALL_DATA) ./COPYING $(DIST_DIR)
    4.55 +	$(INSTALL_DATA) ./README $(DIST_DIR)
    4.56 +	$(INSTALL_PROG) ./install.sh $(DIST_DIR)
    4.57 +	$(INSTALL_PROG) tools/check/chk tools/check/check_* $(DIST_DIR)/check
    4.58  
    4.59  xen:
    4.60 -	$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
    4.61 +	$(MAKE) dist=yes -C xen install
    4.62  
    4.63  tools:
    4.64 -	$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
    4.65 +	$(MAKE) dist=yes -C tools install
    4.66  
    4.67  kernels:
    4.68  	for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
    4.69  
    4.70  docs:
    4.71 -	sh ./docs/check_pkgs && \
    4.72 -		$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true
    4.73 +	sh ./docs/check_pkgs
    4.74 +	-$(MAKE) dist=yes -C docs install
    4.75  
    4.76  # Build all the various kernels and modules
    4.77  kbuild: kernels
    4.78 @@ -103,20 +110,19 @@ mrproper: clean
    4.79  install-twisted:
    4.80  	wget http://www.twistedmatrix.com/products/get-current.epy
    4.81  	tar -zxf Twisted-*.tar.gz
    4.82 -	( cd Twisted-* ; python setup.py install )
    4.83 +	cd Twisted-* && python setup.py install
    4.84  
    4.85  install-logging: LOGGING=logging-0.4.9.2
    4.86  install-logging:
    4.87  	[ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
    4.88  	tar -zxf $(LOGGING).tar.gz
    4.89 -	( cd $(LOGGING) && python setup.py install )
    4.90 +	cd $(LOGGING) && python setup.py install
    4.91  
    4.92  # handy target to upgrade iptables (use rpm or apt-get in preference)
    4.93  install-iptables:
    4.94  	wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
    4.95 -	tar -jxf iptables-*.tar.bz2
    4.96 -	( cd iptables-* ; \
    4.97 -	  make PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install)
    4.98 +	tar -jxf iptables-1.2.11.tar.bz2
    4.99 +	$(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
   4.100  
   4.101  help:
   4.102  	@echo 'Installation targets:'
     5.1 --- a/buildconfigs/mk.linux-2.4-xen0	Mon Jan 24 17:35:09 2005 +0000
     5.2 +++ b/buildconfigs/mk.linux-2.4-xen0	Tue Jan 25 01:36:09 2005 +0000
     5.3 @@ -13,9 +13,11 @@ include buildconfigs/Rules.mk
     5.4  
     5.5  # The real action starts here!
     5.6  build: $(LINUX_DIR)/include/linux/autoconf.h
     5.7 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen modules
     5.8 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(INSTALL_DIR) modules_install
     5.9 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(INSTALL_DIR) install
    5.10 +	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    5.11 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
    5.12 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    5.13 +	fi
    5.14 +	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    5.15  
    5.16  patches/tmp/ebtables.diff:
    5.17  	mkdir -p patches/tmp
     6.1 --- a/buildconfigs/mk.linux-2.4-xenU	Mon Jan 24 17:35:09 2005 +0000
     6.2 +++ b/buildconfigs/mk.linux-2.4-xenU	Tue Jan 25 01:36:09 2005 +0000
     6.3 @@ -13,9 +13,11 @@ include buildconfigs/Rules.mk
     6.4  
     6.5  # The real action starts here!
     6.6  build: $(LINUX_DIR)/include/linux/autoconf.h
     6.7 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen modules	
     6.8 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(INSTALL_DIR) modules_install
     6.9 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(INSTALL_DIR) install
    6.10 +	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    6.11 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
    6.12 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    6.13 +	fi
    6.14 +	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    6.15  
    6.16  $(LINUX_DIR)/include/linux/autoconf.h: pristine-linux-$(LINUX_VER)
    6.17  	rm -rf $(LINUX_DIR)
     7.1 --- a/buildconfigs/mk.linux-2.6-xen0	Mon Jan 24 17:35:09 2005 +0000
     7.2 +++ b/buildconfigs/mk.linux-2.6-xen0	Tue Jan 25 01:36:09 2005 +0000
     7.3 @@ -15,9 +15,9 @@ include buildconfigs/Rules.mk
     7.4  build: $(LINUX_DIR)/include/linux/autoconf.h
     7.5  	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
     7.6  	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
     7.7 -	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(INSTALL_DIR) modules_install ; \
     7.8 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
     7.9  	fi
    7.10 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(INSTALL_DIR) install
    7.11 +	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    7.12  
    7.13  $(LINUX_DIR)/include/linux/autoconf.h: pristine-linux-$(LINUX_VER)
    7.14  	rm -rf $(LINUX_DIR)
     8.1 --- a/buildconfigs/mk.linux-2.6-xenU	Mon Jan 24 17:35:09 2005 +0000
     8.2 +++ b/buildconfigs/mk.linux-2.6-xenU	Tue Jan 25 01:36:09 2005 +0000
     8.3 @@ -15,9 +15,9 @@ include buildconfigs/Rules.mk
     8.4  build: $(LINUX_DIR)/include/linux/autoconf.h
     8.5  	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
     8.6  	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
     8.7 -	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(INSTALL_DIR) modules_install ; \
     8.8 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
     8.9  	fi
    8.10 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(INSTALL_DIR) install
    8.11 +	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    8.12  
    8.13  $(LINUX_DIR)/include/linux/autoconf.h: pristine-linux-$(LINUX_VER)
    8.14  	rm -rf $(LINUX_DIR)
     9.1 --- a/docs/Makefile	Mon Jan 24 17:35:09 2005 +0000
     9.2 +++ b/docs/Makefile	Tue Jan 25 01:36:09 2005 +0000
     9.3 @@ -1,8 +1,24 @@
     9.4 +#!/usr/bin/make -f
     9.5  
     9.6 -DOC_TEX  := $(wildcard src/*.tex)
     9.7 -DOC_PS   := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
     9.8 -DOC_PDF  := $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
     9.9 -DOC_HTML := $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
    9.10 +INSTALL		= install
    9.11 +INSTALL_DIR	= $(INSTALL) -d -m0755
    9.12 +
    9.13 +PS2PDF		:= ps2pdf
    9.14 +DVIPS		:= dvips
    9.15 +LATEX		:= latex
    9.16 +FIG2DEV		:= fig2dev
    9.17 +TGIF		:= tgif
    9.18 +LATEX2HTML	:= latex2html
    9.19 +
    9.20 +package		= xen
    9.21 +prefix		= /usr
    9.22 +docdir		= $(prefix)/share/doc
    9.23 +pkgdocdir	= $(docdir)/$(package)
    9.24 +
    9.25 +DOC_TEX		:= $(wildcard src/*.tex)
    9.26 +DOC_PS		:= $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
    9.27 +DOC_PDF		:= $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
    9.28 +DOC_HTML	:= $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
    9.29  
    9.30  GFX  = $(patsubst %.obj, %.eps, $(wildcard figs/*.obj))
    9.31  GFX += $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
    9.32 @@ -22,30 +38,34 @@ clean:
    9.33  	rm -rf $(GFX) ps pdf html
    9.34  
    9.35  install: all
    9.36 -	rm -rf $(prefix)/usr/share/doc/xen
    9.37 -	mkdir -p $(prefix)/usr/share/doc/xen
    9.38 -	cp -dR ps $(prefix)/usr/share/doc/xen
    9.39 -	cp -dR pdf $(prefix)/usr/share/doc/xen
    9.40 -	cp -dR html $(prefix)/usr/share/doc/xen
    9.41 +	rm -rf $(DESTDIR)$(pkgdocdir)
    9.42 +	$(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
    9.43 +	cp -dR ps $(DESTDIR)$(pkgdocdir)
    9.44 +	cp -dR pdf $(DESTDIR)$(pkgdocdir)
    9.45 +	cp -dR html $(DESTDIR)$(pkgdocdir)
    9.46  
    9.47  pdf/%.pdf: ps/%.ps
    9.48 -	mkdir -p pdf ; ps2pdf $< $@
    9.49 +	$(INSTALL_DIR) $(@D)
    9.50 +	$(PS2PDF) $< $@.new
    9.51 +	mv $@.new $@
    9.52  
    9.53  ps/%.ps: %.dvi
    9.54 -	mkdir -p ps ; dvips -Ppdf -G0 -o $@ $<
    9.55 +	$(INSTALL_DIR) $(@D)
    9.56 +	$(DVIPS) -Ppdf -G0 -o $@.new $<
    9.57 +	mv $@.new $@
    9.58  
    9.59  %.dvi: src/%.tex $(GFX)
    9.60 -	latex $< >/dev/null
    9.61 -	if [ -e $*.toc ] ; then latex $< >/dev/null ; fi
    9.62 +	$(LATEX) $< >/dev/null
    9.63 +	if [ -e $*.toc ] ; then $(LATEX) $< >/dev/null ; fi
    9.64  
    9.65  %.eps: %.fig
    9.66 -	fig2dev -L eps $< $@
    9.67 +	$(FIG2DEV) -L eps $< $@
    9.68  
    9.69  %.eps: %.obj
    9.70 -	tgif -print -color -eps $<
    9.71 +	$(TGIF) -print -color -eps $<
    9.72  
    9.73  html/%/index.html: src/%.tex
    9.74 -	mkdir -p html/$*
    9.75 -	latex2html -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
    9.76 -	-numbered_footnotes -local_icons -noinfo -math -dir html/$* \
    9.77 +	$(INSTALL_DIR) $(@D)
    9.78 +	$(LATEX2HTML) -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
    9.79 +	-numbered_footnotes -local_icons -noinfo -math -dir $(@D) \
    9.80  	$< 1>/dev/null 2>/dev/null
    10.1 --- a/install.sh	Mon Jan 24 17:35:09 2005 +0000
    10.2 +++ b/install.sh	Tue Jan 25 01:36:09 2005 +0000
    10.3 @@ -23,6 +23,15 @@ if ! [ -d $dst ]; then
    10.4  fi
    10.5  
    10.6  echo "Installing Xen from '$src' to '$dst'..."
    10.7 +cd $src/boot
    10.8 +(echo '2.6.*' -2.6; echo '2.4.*' -2.4; echo '2.*.*' '') | while read mv
    10.9 +do
   10.10 +  l=$(eval ls -t vmlinuz-$m-xen0 2>/dev/null | head -n 1)
   10.11 +  [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xen0
   10.12 +  l=$(eval ls -t vmlinuz-$m-xenU 2>/dev/null | head -n 1)
   10.13 +  [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xenU
   10.14 +done
   10.15 +cd -
   10.16  cp -fdR $src/* $dst
   10.17  echo "All done."
   10.18  
    11.1 --- a/linux-2.4.29-xen-sparse/mkbuildtree	Mon Jan 24 17:35:09 2005 +0000
    11.2 +++ b/linux-2.4.29-xen-sparse/mkbuildtree	Tue Jan 25 01:36:09 2005 +0000
    11.3 @@ -1,4 +1,4 @@
    11.4 -#!/bin/sh
    11.5 +#!/bin/bash
    11.6  
    11.7  # mkbuildtree <build tree>
    11.8  #
    12.1 --- a/linux-2.6.10-xen-sparse/mkbuildtree	Mon Jan 24 17:35:09 2005 +0000
    12.2 +++ b/linux-2.6.10-xen-sparse/mkbuildtree	Tue Jan 25 01:36:09 2005 +0000
    12.3 @@ -1,4 +1,4 @@
    12.4 -#!/bin/sh
    12.5 +#!/bin/bash
    12.6  
    12.7  # mkbuildtree <build tree>
    12.8  #
    13.1 --- a/netbsd-2.0-xen-sparse/mkbuildtree	Mon Jan 24 17:35:09 2005 +0000
    13.2 +++ b/netbsd-2.0-xen-sparse/mkbuildtree	Tue Jan 25 01:36:09 2005 +0000
    13.3 @@ -1,4 +1,4 @@
    13.4 -#!/bin/sh
    13.5 +#!/bin/bash
    13.6  
    13.7  # mkbuildtree <build tree>
    13.8  #
    14.1 --- a/tools/Makefile	Mon Jan 24 17:35:09 2005 +0000
    14.2 +++ b/tools/Makefile	Tue Jan 25 01:36:09 2005 +0000
    14.3 @@ -27,7 +27,7 @@ endif
    14.4  	$(MAKE) -C ioemu install
    14.5  
    14.6  dist: $(TARGET)
    14.7 -	$(MAKE) prefix=`pwd`/../dist/install dist=yes install
    14.8 +	$(MAKE) prefix=$(CURDIR)/../dist/install dist=yes install
    14.9  
   14.10  clean:
   14.11  	$(MAKE) -C libxutil clean
    15.1 --- a/tools/examples/Makefile	Mon Jan 24 17:35:09 2005 +0000
    15.2 +++ b/tools/examples/Makefile	Tue Jan 25 01:36:09 2005 +0000
    15.3 @@ -1,3 +1,7 @@
    15.4 +INSTALL		= install
    15.5 +INSTALL_DIR	= $(INSTALL) -d -m0755
    15.6 +INSTALL_PROG	= $(INSTALL) -m0755
    15.7 +INSTALL_DATA	= $(INSTALL) -m0644
    15.8  
    15.9  # Init scripts.
   15.10  XEND_INITD = init.d/xend
   15.11 @@ -24,23 +28,23 @@ all:
   15.12  install: all install-initd install-configs install-scripts
   15.13  
   15.14  install-initd:
   15.15 -	install -d $(prefix)/etc/init.d
   15.16 -	install -m0755 $(XEND_INITD) $(prefix)/etc/init.d
   15.17 -	install -m0755 $(XENDOMAINS_INITD) $(prefix)/etc/init.d
   15.18 +	$(INSTALL_DIR) $(DESTDIR)/etc/init.d
   15.19 +	$(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
   15.20 +	$(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
   15.21  
   15.22  install-configs:
   15.23 -	install -d $(prefix)$(XEN_CONFIG_DIR)
   15.24 -	install -d $(prefix)$(XEN_CONFIG_DIR)/auto
   15.25 +	$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
   15.26 +	$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
   15.27  	for i in $(XEN_CONFIGS); \
   15.28 -	    do [ -a $(prefix)/$(XEN_CONFIG_DIR)/$$i ] || \
   15.29 -	    install -m0644 $$i $(prefix)$(XEN_CONFIG_DIR); \
   15.30 +	    do [ -a $(DESTDIR)/$(XEN_CONFIG_DIR)/$$i ] || \
   15.31 +	    $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
   15.32  	done
   15.33  
   15.34  install-scripts:
   15.35 -	install -d $(prefix)$(XEN_SCRIPT_DIR)
   15.36 +	$(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
   15.37  	for i in $(XEN_SCRIPTS); \
   15.38 -	    do [ -a $(prefix)/$()/$$i ] || \
   15.39 -	    install -m0755 $$i $(prefix)$(XEN_SCRIPT_DIR); \
   15.40 +	    do [ -a $(DESTDIR)/$()/$$i ] || \
   15.41 +	    $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
   15.42  	done
   15.43  
   15.44  clean:
    16.1 --- a/tools/examples/init.d/xend	Mon Jan 24 17:35:09 2005 +0000
    16.2 +++ b/tools/examples/init.d/xend	Tue Jan 25 01:36:09 2005 +0000
    16.3 @@ -32,14 +32,14 @@ case "$1" in
    16.4    status)
    16.5  	xend status
    16.6  	;;
    16.7 -  restart|reload)
    16.8 +  restart|reload|force-reload)
    16.9  	xend restart
   16.10  	await_daemons_up
   16.11  	;;
   16.12    *)
   16.13  	# do not advertise unreasonable commands that there is no reason
   16.14  	# to use with this device
   16.15 -	echo $"Usage: $0 {start|stop|status|restart|reload}"
   16.16 +	echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
   16.17  	exit 1
   16.18  esac
   16.19  
    17.1 --- a/tools/examples/network	Mon Jan 24 17:35:09 2005 +0000
    17.2 +++ b/tools/examples/network	Tue Jan 25 01:36:09 2005 +0000
    17.3 @@ -61,13 +61,13 @@ transfer_addrs () {
    17.4      local src=$1
    17.5      local dst=$2
    17.6      # Don't bother if $dst already has IP addresses.
    17.7 -    if ip addr show dev ${dst} | egrep -q '^ *inet' ; then
    17.8 +    if ip addr show dev ${dst} | egrep -q '^ *inet ' ; then
    17.9          return
   17.10      fi
   17.11      # Address lines start with 'inet' and have the device in them.
   17.12      # Replace 'inet' with 'ip addr add' and change the device name $src
   17.13      # to 'dev $src'. Remove netmask as we'll add routes later.
   17.14 -    ip addr show dev ${src} | egrep '^ *inet' | sed -e "
   17.15 +    ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
   17.16  s/inet/ip addr add/
   17.17  s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)/[0-9]\+@\1@
   17.18  s/${src}/dev ${dst}/
    18.1 --- a/tools/libxc/Makefile	Mon Jan 24 17:35:09 2005 +0000
    18.2 +++ b/tools/libxc/Makefile	Tue Jan 25 01:36:09 2005 +0000
    18.3 @@ -1,7 +1,12 @@
    18.4 +INSTALL		= install
    18.5 +INSTALL_PROG	= $(INSTALL) -m0755
    18.6 +INSTALL_DATA	= $(INSTALL) -m0644
    18.7 +INSTALL_DIR	= $(INSTALL) -d -m0755
    18.8  
    18.9 -MAJOR    = 2.0
   18.10 -MINOR    = 0
   18.11 -SONAME   = libxc.so.$(MAJOR)
   18.12 +MAJOR		:= 2.0
   18.13 +MINOR		:= 0
   18.14 +LIB_NAME	:= libxc
   18.15 +SONAME		:= $(LIB_NAME).so.$(MAJOR)
   18.16  
   18.17  CC       = gcc
   18.18  
   18.19 @@ -36,9 +41,10 @@ CFLAGS   += $(INCLUDES) -I.
   18.20  CFLAGS   += -Wp,-MD,.$(@F).d
   18.21  DEPS     = .*.d
   18.22  
   18.23 -OBJS     = $(patsubst %.c,%.o,$(SRCS))
   18.24 +OBJS     := $(patsubst %.c,%.o,$(SRCS))
   18.25 +PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
   18.26  
   18.27 -LIB      = libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
   18.28 +LIB		:= $(LIB_NAME).a $(LIB_NAME).so $(LIB_NAME).so.$(MAJOR) $(LIB_NAME).so.$(MAJOR).$(MINOR)
   18.29  
   18.30  all: check-for-zlib mk-symlinks
   18.31  	$(MAKE) $(LIB)
   18.32 @@ -63,15 +69,15 @@ mk-symlinks:
   18.33  	  ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )
   18.34  
   18.35  install: all
   18.36 -	mkdir -p $(prefix)/usr/lib
   18.37 -	mkdir -p $(prefix)/usr/include
   18.38 -	install -m0755 $(LIB) $(prefix)/usr/lib
   18.39 -	ln -sf libxc.so.$(MAJOR).$(MINOR) $(prefix)/usr/lib/libxc.so.$(MAJOR)
   18.40 -	ln -sf libxc.so.$(MAJOR) $(prefix)/usr/lib/libxc.so
   18.41 -	install -m0644 xc.h $(prefix)/usr/include
   18.42 +	$(INSTALL_DIR) $(DESTDIR)/usr/lib
   18.43 +	$(INSTALL_DIR) $(DESTDIR)/usr/include
   18.44 +	$(INSTALL_PROG) $(LIB) $(DESTDIR)/usr/lib
   18.45 +	ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so.$(MAJOR)
   18.46 +	ln -sf $(LIB_NAME).so.$(MAJOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so
   18.47 +	$(INSTALL_DATA) xc.h $(DESTDIR)/usr/include
   18.48  
   18.49  clean:
   18.50 -	rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS
   18.51 +	rm -rf *.a *.so *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen TAGS
   18.52  
   18.53  rpm: all
   18.54  	rm -rf staging
   18.55 @@ -82,11 +88,17 @@ rpm: all
   18.56  	mv staging/i386/*.rpm .
   18.57  	rm -rf staging
   18.58  
   18.59 -libxc.so:
   18.60 -	ln -sf libxc.so.$(MAJOR) $@
   18.61 -libxc.so.$(MAJOR):
   18.62 -	ln -sf libxc.so.$(MAJOR).$(MINOR) $@
   18.63 -libxc.so.$(MAJOR).$(MINOR): $(OBJS)
   18.64 +$(PIC_OBJS): %.opic: %.c
   18.65 +	$(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
   18.66 +
   18.67 +$(LIB_NAME).a: $(OBJS)
   18.68 +	$(AR) rc $@ $^
   18.69 +
   18.70 +$(LIB_NAME).so: $(LIB_NAME).so.$(MAJOR)
   18.71 +	ln -sf $< $@
   18.72 +$(LIB_NAME).so.$(MAJOR): $(LIB_NAME).so.$(MAJOR).$(MINOR)
   18.73 +	ln -sf $< $@
   18.74 +$(LIB_NAME).so.$(MAJOR).$(MINOR): $(PIC_OBJS)
   18.75  	$(CC) -Wl,-soname -Wl,$(SONAME) -shared -o $@ $^ -L../libxutil -lxutil -lz
   18.76  
   18.77  .PHONY: TAGS clean install mk-symlinks rpm
    19.1 --- a/tools/libxutil/Makefile	Mon Jan 24 17:35:09 2005 +0000
    19.2 +++ b/tools/libxutil/Makefile	Tue Jan 25 01:36:09 2005 +0000
    19.3 @@ -1,4 +1,9 @@
    19.4  XEN_ROOT = ../..
    19.5 +INSTALL		= install
    19.6 +INSTALL_DATA	= $(INSTALL) -m0644
    19.7 +INSTALL_PROG	= $(INSTALL) -m0755
    19.8 +INSTALL_DIR	= $(INSTALL) -d -m0755
    19.9 +
   19.10  include $(XEN_ROOT)/tools/Make.defs
   19.11  
   19.12  CC = gcc
   19.13 @@ -19,6 +24,7 @@ LIB_SRCS += sys_string.c
   19.14  LIB_SRCS += util.c
   19.15  
   19.16  LIB_OBJS := $(LIB_SRCS:.c=.o)
   19.17 +LIB_PIC_OBJS := $(LIB_SRCS:.c=.opic)
   19.18  
   19.19  CFLAGS   += -Wall
   19.20  CFLAGS   += -Werror
   19.21 @@ -33,6 +39,7 @@ DEPS     = .*.d
   19.22  MAJOR    := 2.0
   19.23  MINOR    := 0
   19.24  LIB_NAME := libxutil
   19.25 +SO_NAME  := $(LIB_NAME).so.$(MAJOR)
   19.26  LIB      := $(LIB_NAME).so 
   19.27  LIB      += $(LIB_NAME).so.$(MAJOR)
   19.28  LIB      += $(LIB_NAME).so.$(MAJOR).$(MINOR)
   19.29 @@ -41,14 +48,17 @@ LIB      += $(LIB_NAME).a
   19.30  all: check-for-zlib
   19.31  	$(MAKE) $(LIB)
   19.32  
   19.33 +$(LIB_PIC_OBJS): %.opic: %.c
   19.34 +	$(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
   19.35 +
   19.36  $(LIB_NAME).so: $(LIB_NAME).so.$(MAJOR)
   19.37  	ln -sf $^ $@
   19.38  
   19.39  $(LIB_NAME).so.$(MAJOR): $(LIB_NAME).so.$(MAJOR).$(MINOR)
   19.40  	ln -sf $^ $@
   19.41  
   19.42 -$(LIB_NAME).so.$(MAJOR).$(MINOR): $(LIB_OBJS)
   19.43 -	$(CC) -Wl,-soname -Wl,$(LIB_NAME).so.$(MAJOR) -shared -o $@ $^
   19.44 +$(LIB_NAME).so.$(MAJOR).$(MINOR): $(LIB_PIC_OBJS)
   19.45 +	$(CC) -Wl,-soname -Wl,$(SO_NAME) -shared -o $@ $^
   19.46  
   19.47  $(LIB_NAME).a: $(LIB_OBJS)
   19.48  	$(AR) rc $@ $^
   19.49 @@ -62,13 +72,13 @@ check-for-zlib:
   19.50  	fi
   19.51  
   19.52  install: all
   19.53 -	mkdir -p $(prefix)/usr/lib
   19.54 -	install -m0755 $(LIB) $(prefix)/usr/lib
   19.55 -	ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(prefix)/usr/lib/$(LIB_NAME).so.$(MAJOR)
   19.56 -	ln -sf $(LIB_NAME).so.$(MAJOR) $(prefix)/usr/lib/$(LIB_NAME).so
   19.57 +	$(INSTALL_DIR) -p $(DESTDIR)/usr/lib
   19.58 +	$(INSTALL_PROG) $(LIB) $(DESTDIR)/usr/lib
   19.59 +	ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so.$(MAJOR)
   19.60 +	ln -sf $(LIB_NAME).so.$(MAJOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so
   19.61  
   19.62  clean:
   19.63 -	$(RM) *.a *.so *.so.* *.o *.rpm 
   19.64 +	$(RM) *.a *.so *.so.* *.o *.opic *.rpm 
   19.65  	$(RM) *~
   19.66  	$(RM) $(DEPS)
   19.67  
    20.1 --- a/tools/misc/Makefile	Mon Jan 24 17:35:09 2005 +0000
    20.2 +++ b/tools/misc/Makefile	Tue Jan 25 01:36:09 2005 +0000
    20.3 @@ -1,3 +1,6 @@
    20.4 +INSTALL		= install
    20.5 +INSTALL_PROG	= $(INSTALL) -m0755
    20.6 +INSTALL_DIR	= $(INSTALL) -d -m0755
    20.7  
    20.8  XEN_ROOT=../..
    20.9  include $(XEN_ROOT)/tools/Make.defs
   20.10 @@ -20,10 +23,10 @@ all: $(TARGETS)
   20.11  	$(MAKE) -C miniterm
   20.12  
   20.13  install: all
   20.14 -	mkdir -p $(prefix)/usr/bin
   20.15 -	mkdir -p $(prefix)/usr/sbin
   20.16 -	install -m0755 $(INSTALL_BIN) $(prefix)/usr/bin
   20.17 -	install -m0755 $(INSTALL_SBIN) $(prefix)/usr/sbin
   20.18 +	$(INSTALL_DIR) $(DESTDIR)/usr/bin
   20.19 +	$(INSTALL_DIR) $(DESTDIR)/usr/sbin
   20.20 +	$(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
   20.21 +	$(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin
   20.22  	$(MAKE) -C miniterm install
   20.23  
   20.24  clean:
    21.1 --- a/tools/misc/miniterm/Makefile	Mon Jan 24 17:35:09 2005 +0000
    21.2 +++ b/tools/misc/miniterm/Makefile	Tue Jan 25 01:36:09 2005 +0000
    21.3 @@ -1,3 +1,6 @@
    21.4 +INSTALL		= install
    21.5 +INSTALL_PROG	= $(INSTALL) -m0755
    21.6 +INSTALL_DIR	= $(INSTALL) -d -m0755
    21.7  
    21.8  CC     = gcc
    21.9  CFLAGS = -Wall -O3
   21.10 @@ -6,8 +9,8 @@ TARGET = miniterm
   21.11  all: $(TARGET)
   21.12  
   21.13  install: all
   21.14 -	mkdir -p $(prefix)/usr/bin
   21.15 -	install -m0755 $(TARGET) $(prefix)/usr/bin
   21.16 +	$(INSTALL_DIR) $(DESTDIR)/usr/bin
   21.17 +	$(INSTALL_PROG) $(TARGET) $(DESTDIR)/usr/bin
   21.18  
   21.19  clean:
   21.20  	$(RM) *.o $(TARGET) *~
    22.1 --- a/tools/python/Makefile	Mon Jan 24 17:35:09 2005 +0000
    22.2 +++ b/tools/python/Makefile	Tue Jan 25 01:36:09 2005 +0000
    22.3 @@ -3,7 +3,11 @@ all:
    22.4  	python setup.py build
    22.5  
    22.6  install: all
    22.7 -	python setup.py install --home="$(prefix)/usr"
    22.8 +	if [ "$(DESTDIR)" = "" ]; then                   \
    22.9 +	    python setup.py install;                     \
   22.10 +	else                                             \
   22.11 +	    python setup.py install --root="$(DESTDIR)"; \
   22.12 +	fi
   22.13  
   22.14  clean:
   22.15  	rm -rf build *.pyc *.pyo *.o *.a *~
    23.1 --- a/tools/python/xen/sv/params.py	Mon Jan 24 17:35:09 2005 +0000
    23.2 +++ b/tools/python/xen/sv/params.py	Tue Jan 25 01:36:09 2005 +0000
    23.3 @@ -1,3 +1,3 @@
    23.4  SV_PORT = 8080
    23.5 -SV_ROOT = "/var/xen/sv/"
    23.6 -PID_FILE = "/var/xen/sv.pid"
    23.7 \ No newline at end of file
    23.8 +SV_ROOT = "/var/lib/xen/sv/"
    23.9 +PID_FILE = "/var/run/xen-sv.pid"
    24.1 --- a/tools/python/xen/xend/XendRoot.py	Mon Jan 24 17:35:09 2005 +0000
    24.2 +++ b/tools/python/xen/xend/XendRoot.py	Tue Jan 25 01:36:09 2005 +0000
    24.3 @@ -20,7 +20,7 @@ class XendRoot:
    24.4      """Root of the management classes."""
    24.5  
    24.6      """Default path to the root of the database."""
    24.7 -    dbroot_default = "/var/xen/xend-db"
    24.8 +    dbroot_default = "/var/lib/xen/xend-db"
    24.9  
   24.10      """Default path to the config file."""
   24.11      config_default = "/etc/xen/xend-config.sxp"
    25.1 --- a/tools/python/xen/xend/server/SrvServer.py	Mon Jan 24 17:35:09 2005 +0000
    25.2 +++ b/tools/python/xen/xend/server/SrvServer.py	Tue Jan 25 01:36:09 2005 +0000
    25.3 @@ -1,4 +1,4 @@
    25.4 -#!/usr/bin/python2
    25.5 +#!/usr/bin/python
    25.6  # Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
    25.7  
    25.8  """Example xend HTTP and console server.
    26.1 --- a/tools/python/xen/xend/sxp.py	Mon Jan 24 17:35:09 2005 +0000
    26.2 +++ b/tools/python/xen/xend/sxp.py	Tue Jan 25 01:36:09 2005 +0000
    26.3 @@ -1,4 +1,4 @@
    26.4 -#!/usr/bin/python2
    26.5 +#!/usr/bin/python
    26.6  # Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
    26.7  """
    26.8  Input-driven parsing for s-expression (sxp) format.
    27.1 --- a/tools/sv/Makefile	Mon Jan 24 17:35:09 2005 +0000
    27.2 +++ b/tools/sv/Makefile	Tue Jan 25 01:36:09 2005 +0000
    27.3 @@ -1,4 +1,7 @@
    27.4 -sv_insdir := $(prefix)/var/xen/sv
    27.5 +sv_insdir := /var/lib/xen/sv
    27.6 +INSTALL		= install
    27.7 +INSTALL_DIR	= $(INSTALL) -d -m0755
    27.8 +INSTALL_DATA	= $(INSTALL) -m0644
    27.9  
   27.10  all:
   27.11  
   27.12 @@ -14,17 +17,16 @@ IMAGES	+= next.png previous.png finish.p
   27.13  
   27.14  install:
   27.15  	# copy XenSV Main.rpy file
   27.16 -	@mkdir -p $(sv_insdir)
   27.17 -	@install -m0644 Main.rpy $(sv_insdir)
   27.18 +	@$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)
   27.19 +	@$(INSTALL_DATA) Main.rpy $(DESTDIR)$(sv_insdir)
   27.20  
   27.21  	# copy XenSV images
   27.22 -	@mkdir -p $(sv_insdir)/images
   27.23 -	@(cd images && install -m0644 $(IMAGES) $(sv_insdir)/images)
   27.24 +	@$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)/images
   27.25 +	@(cd images && $(INSTALL_DATA) $(IMAGES) $(DESTDIR)$(sv_insdir)/images)
   27.26  
   27.27  	# copy XenSV stylesheet
   27.28 -	@mkdir -p $(sv_insdir)/inc
   27.29 -	@install -m0644 inc/style.css $(sv_insdir)/inc
   27.30 -	@install -m0644 inc/script.js $(sv_insdir)/inc
   27.31 +	@$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)/inc
   27.32 +	@$(INSTALL_DATA) inc/style.css inc/script.js $(DESTDIR)$(sv_insdir)/inc
   27.33  
   27.34  clean:
   27.35  
    28.1 --- a/tools/xentrace/Makefile	Mon Jan 24 17:35:09 2005 +0000
    28.2 +++ b/tools/xentrace/Makefile	Tue Jan 25 01:36:09 2005 +0000
    28.3 @@ -1,3 +1,7 @@
    28.4 +INSTALL		= install
    28.5 +INSTALL_PROG	= $(INSTALL) -m0755
    28.6 +INSTALL_DIR	= $(INSTALL) -d -m0755
    28.7 +INSTALL_DATA	= $(INSTALL) -m0644
    28.8  
    28.9  XEN_ROOT=../..
   28.10  include $(XEN_ROOT)/tools/Make.defs
   28.11 @@ -20,12 +24,12 @@ MAN8     = $(wildcard *.8)
   28.12  all: $(BIN)
   28.13  
   28.14  install: all
   28.15 -	mkdir -p $(prefix)/usr/bin
   28.16 -	mkdir -p $(prefix)/usr/man/man1
   28.17 -	mkdir -p $(prefix)/usr/man/man8
   28.18 -	install -m0755 $(BIN) $(SCRIPTS) $(prefix)/usr/bin
   28.19 -	install -m0644 $(MAN1) $(prefix)/usr/man/man1
   28.20 -	install -m0644 $(MAN8) $(prefix)/usr/man/man8
   28.21 +	$(INSTALL_DIR) $(DESTDIR)/usr/bin
   28.22 +	$(INSTALL_DIR) $(DESTDIR)/usr/man/man1
   28.23 +	$(INSTALL_DIR) $(DESTDIR)/usr/man/man8
   28.24 +	$(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin
   28.25 +	$(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/man/man1
   28.26 +	$(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/man/man8
   28.27  
   28.28  clean:
   28.29  	$(RM) *.a *.so *.o *.rpm $(BIN)
    29.1 --- a/tools/xfrd/Makefile	Mon Jan 24 17:35:09 2005 +0000
    29.2 +++ b/tools/xfrd/Makefile	Tue Jan 25 01:36:09 2005 +0000
    29.3 @@ -4,6 +4,10 @@
    29.4  # Mike Wray <mike.wray@hp.com>
    29.5  #============================================================================
    29.6  
    29.7 +INSTALL		= install
    29.8 +INSTALL_PROG	= $(INSTALL) -m0755
    29.9 +INSTALL_DIR	= $(INSTALL) -d -m0755
   29.10 +
   29.11  XEN_ROOT  = ../..
   29.12  include $(XEN_ROOT)/tools/Make.defs
   29.13  
   29.14 @@ -68,8 +72,8 @@ xfrd: $(XFRD_PROG_OBJ)
   29.15  
   29.16  .PHONY: install
   29.17  install: xfrd
   29.18 -	mkdir -p $(prefix)/$(XFRD_INSTALL_DIR)
   29.19 -	install -m 0755 xfrd $(prefix)/$(XFRD_INSTALL_DIR)
   29.20 +	$(INSTALL_DIR) $(DESTDIR)/$(XFRD_INSTALL_DIR)
   29.21 +	$(INSTALL_PROG) xfrd $(DESTDIR)/$(XFRD_INSTALL_DIR)
   29.22  
   29.23  .PHONY: libutil
   29.24  libutil: $(UTIL_LIB)
    30.1 --- a/xen/Makefile	Mon Jan 24 17:35:09 2005 +0000
    30.2 +++ b/xen/Makefile	Tue Jan 25 01:36:09 2005 +0000
    30.3 @@ -1,3 +1,6 @@
    30.4 +INSTALL			= install
    30.5 +INSTALL_DATA		= $(INSTALL) -m0644
    30.6 +INSTALL_DIR		= $(INSTALL) -d -m0755
    30.7  
    30.8  # This is the correct place to edit the build version.
    30.9  # All other places this is stored (eg. compile.h) should be autogenerated.
   30.10 @@ -5,28 +8,29 @@ export XEN_VERSION       = 3
   30.11  export XEN_SUBVERSION    = 0
   30.12  export XEN_EXTRAVERSION  = "-devel"
   30.13  
   30.14 -export BASEDIR          := $(shell pwd)
   30.15 +export BASEDIR          := $(CURDIR)
   30.16 +DESTDIR			:= $(CURDIR)/../dist/install
   30.17  
   30.18  include Rules.mk
   30.19  
   30.20 -default: $(TARGET)
   30.21 -	gzip -f -9 < $(TARGET) > $(TARGET).gz
   30.22 +default: $(TARGET).gz
   30.23 +$(TARGET).gz: $(TARGET)
   30.24 +	gzip -f -9 < $< > $@.new
   30.25 +	mv $@.new $@
   30.26  
   30.27  debug:	
   30.28  	objdump -D -S $(TARGET)-syms > $(TARGET).s
   30.29  
   30.30 -install: $(TARGET)
   30.31 -	gzip -f -9 < $(TARGET) > $(TARGET).gz
   30.32 -	mkdir -p $(prefix)/boot
   30.33 -	install -m0644 $(TARGET).gz $(prefix)/boot
   30.34 -	install -m0644 $(TARGET)-syms $(prefix)/boot
   30.35 -	mkdir -p $(prefix)/usr/include/xen/io
   30.36 -	install -m0644 include/public/*.h $(prefix)/usr/include/xen
   30.37 -	install -m0644 include/public/io/*.h $(prefix)/usr/include/xen/io
   30.38 -	install -m0644 include/public/COPYING $(prefix)/usr/include/xen
   30.39 +install: $(TARGET).gz
   30.40 +	$(INSTALL_DIR) $(DESTDIR)/boot
   30.41 +	$(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot
   30.42 +	$(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot
   30.43 +	$(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io
   30.44 +	$(INSTALL_DATA) include/public/*.h $(DESTDIR)/usr/include/xen
   30.45 +	$(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
   30.46 +	$(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
   30.47  
   30.48 -dist: $(TARGET)
   30.49 -	$(MAKE) prefix=`pwd`/../dist/install dist=yes install
   30.50 +dist: install
   30.51  
   30.52  clean:
   30.53  	$(MAKE) -C tools clean
   30.54 @@ -35,11 +39,10 @@ clean:
   30.55  	$(MAKE) -C arch/$(TARGET_ARCH) clean
   30.56  	rm -f include/asm *.o $(TARGET)* *~ core include/xen/compile.h
   30.57  	rm -f include/asm-*/asm-offsets.h
   30.58 +	rm -f tools/figlet/*.o tools/figlet/figlet
   30.59  
   30.60 -$(TARGET): delete-unfresh-files
   30.61 +$(TARGET): delete-unfresh-files include/xen/compile.h
   30.62  	[ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
   30.63 -	$(MAKE) -C tools
   30.64 -	$(MAKE) include/xen/compile.h
   30.65  	$(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
   30.66  	$(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
   30.67  	$(MAKE) -C common
   30.68 @@ -51,25 +54,30 @@ delete-unfresh-files:
   30.69  	rm -f include/xen/compile.h common/kernel.o
   30.70  
   30.71  # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
   30.72 -include/xen/compile.h:
   30.73 -	@LANG=C echo /\* Autogenerated by root Makefile. Do not edit. \*/ > $@
   30.74 -	@LANG=C echo >> $@
   30.75 -	@LANG=C echo \#define XEN_COMPILE_DATE \"`date`\" >> $@
   30.76 -	@LANG=C echo \#define XEN_COMPILE_TIME \"`date +%T`\" >> $@
   30.77 -	@LANG=C echo \#define XEN_COMPILE_BY \"`whoami`\" >> $@
   30.78 -	@LANG=C echo \#define XEN_COMPILE_DOMAIN \"`([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown])`\" >> $@
   30.79 -	@LANG=C echo \#define XEN_COMPILE_HOST \"`hostname`\" >> $@
   30.80 -	@LANG=C echo \#define XEN_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -n 1`\" >> $@
   30.81 -	@LANG=C echo >> $@
   30.82 -	@LANG=C echo \#define XEN_VERSION\ \ \ \ \ \ $(XEN_VERSION) >> $@
   30.83 -	@LANG=C echo \#define XEN_SUBVERSION\ \ \ $(XEN_SUBVERSION) >> $@
   30.84 -	@LANG=C echo \#define XEN_EXTRAVERSION \"$(XEN_EXTRAVERSION)\" >> $@
   30.85 -	@LANG=C echo >> $@
   30.86 -	@LANG=C echo \#define XEN_CHANGESET \"`bk changes -nd':D: :T: :REV: :MD5KEY:' -r+ 2>/dev/null || echo "information unavailable"`\" >> $@
   30.87 -	@LANG=C echo >> $@
   30.88 -	@LANG=C echo \#define XEN_BANNER \\ >> $@
   30.89 -	( cd ./tools/figlet && ./figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) 1>>../../$@ )
   30.90 -	@LANG=C echo >> $@
   30.91 +include/xen/compile.h: LANG=C
   30.92 +include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
   30.93 +	sed -e 's/@@date@@/$(shell date)/g' \
   30.94 +	    -e 's/@@time@@/$(shell date +%T)/g' \
   30.95 +	    -e 's/@@whoami@@/$(shell whoami)/g' \
   30.96 +	    -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
   30.97 +	    -e 's/@@hostname@@/$(shell hostname)/g' \
   30.98 +	    -e 's/@@compiler@@/$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -1)/g' \
   30.99 +	    -e 's/@@version@@/$(XEN_VERSION)/g' \
  30.100 +	    -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
  30.101 +	    -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
  30.102 +	    -e 's!@@changeset@@!$(shell bk changes -nd':D: :T: :REV: :MD5KEY:' -r+ 2>/dev/null || echo information unavailable)!g' \
  30.103 +	    < include/xen/compile.h.in > $@.new
  30.104 +	cat include/xen/banner.h >> $@.new
  30.105 +	mv $@.new $@
  30.106 +
  30.107 +tools/figlet/figlet: tools/figlet/figlet.o
  30.108 +	$(CC) -o $@ $<
  30.109 +tools/figlet/figlet.o: tools/figlet/figlet.c
  30.110 +	$(CC) -o $@ -c $<
  30.111 +
  30.112 +include/xen/banner.h: tools/figlet/figlet tools/figlet/xen.flf
  30.113 +	tools/figlet/figlet -d tools/figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) > $@.new
  30.114 +	mv $@.new $@
  30.115  
  30.116  include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
  30.117  	@(set -e; \
    31.1 --- a/xen/arch/x86/Makefile	Mon Jan 24 17:35:09 2005 +0000
    31.2 +++ b/xen/arch/x86/Makefile	Tue Jan 25 01:36:09 2005 +0000
    31.3 @@ -18,11 +18,17 @@ OBJS := $(subst vmx_io.o,,$(OBJS))
    31.4  OBJS := $(subst vmx_vmcs.o,,$(OBJS))
    31.5  endif
    31.6  
    31.7 -default: boot/$(TARGET_SUBARCH).o $(OBJS) boot/mkelf32
    31.8 -	$(LD) $(LDFLAGS) -r -o arch.o $(OBJS)
    31.9 +default: $(TARGET)
   31.10 +
   31.11 +$(TARGET): $(TARGET)-syms boot/mkelf32
   31.12 +	./boot/mkelf32 $(TARGET)-syms $(TARGET) 0x100000
   31.13 +
   31.14 +$(CURDIR)/arch.o: $(OBJS)
   31.15 +	$(LD) $(LDFLAGS) -r -o $@ $(OBJS)
   31.16 +
   31.17 +$(TARGET)-syms: boot/$(TARGET_SUBARCH).o $(ALL_OBJS) $(TARGET_SUBARCH)/xen.lds
   31.18  	$(LD) $(LDFLAGS) -T $(TARGET_SUBARCH)/xen.lds -N \
   31.19 -	    boot/$(TARGET_SUBARCH).o $(ALL_OBJS) -o $(TARGET)-syms
   31.20 -	./boot/mkelf32 $(TARGET)-syms $(TARGET) 0x100000
   31.21 +	    boot/$(TARGET_SUBARCH).o $(ALL_OBJS) -o $@
   31.22  
   31.23  asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c
   31.24  	$(CC) $(CFLAGS) -S -o $@ $<
    32.1 --- a/xen/common/Makefile	Mon Jan 24 17:35:09 2005 +0000
    32.2 +++ b/xen/common/Makefile	Tue Jan 25 01:36:09 2005 +0000
    32.3 @@ -24,7 +24,8 @@ endif
    32.4  OBJS := $(subst sched_atropos.o,,$(OBJS))
    32.5  OBJS := $(subst sched_rrobin.o,,$(OBJS))
    32.6  
    32.7 -default: $(OBJS)
    32.8 +default: common.o
    32.9 +common.o: $(OBJS)
   32.10  	$(LD) $(LDFLAGS) -r -o common.o $(OBJS)
   32.11  
   32.12  clean:
    33.1 --- a/xen/drivers/acpi/Makefile	Mon Jan 24 17:35:09 2005 +0000
    33.2 +++ b/xen/drivers/acpi/Makefile	Tue Jan 25 01:36:09 2005 +0000
    33.3 @@ -6,7 +6,8 @@ include $(BASEDIR)/Rules.mk
    33.4  
    33.5  OBJS := acpi_ksyms.o tables.o
    33.6  
    33.7 -default: $(OBJS)
    33.8 +default: driver.o
    33.9 +driver.o: $(OBJS)
   33.10  	$(LD) $(LDFLAGS) -r -o driver.o $(OBJS)
   33.11  
   33.12  clean:
    34.1 --- a/xen/drivers/char/Makefile	Mon Jan 24 17:35:09 2005 +0000
    34.2 +++ b/xen/drivers/char/Makefile	Tue Jan 25 01:36:09 2005 +0000
    34.3 @@ -1,7 +1,8 @@
    34.4  
    34.5  include $(BASEDIR)/Rules.mk
    34.6  
    34.7 -default: $(OBJS)
    34.8 +default: driver.o
    34.9 +driver.o: $(OBJS)
   34.10  	$(LD) $(LDFLAGS) -r -o driver.o $(OBJS)
   34.11  
   34.12  clean:
    35.1 --- a/xen/drivers/pci/Makefile	Mon Jan 24 17:35:09 2005 +0000
    35.2 +++ b/xen/drivers/pci/Makefile	Tue Jan 25 01:36:09 2005 +0000
    35.3 @@ -28,7 +28,8 @@ OBJS := pci.o quirks.o compat.o names.o 
    35.4  #obj-y += syscall.o
    35.5  #endif
    35.6  
    35.7 -default: $(OBJS)
    35.8 +default: driver.o
    35.9 +driver.o: $(OBJS)
   35.10  	$(LD) $(LDFLAGS) -r -o driver.o $(OBJS)
   35.11  
   35.12  clean:
    36.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.2 +++ b/xen/include/xen/banner.h	Tue Jan 25 01:36:09 2005 +0000
    36.3 @@ -0,0 +1,12 @@
    36.4 +"\040\137\137\040\040\137\137\040\040\040\040\040\040\040\040\040\040\040" \
    36.5 +"\040\137\137\137\137\040\040\040\040\137\137\137\040\040\012\040\134\040" \
    36.6 +"\134\057\040\057\137\137\137\040\137\040\137\137\040\040\040\174\137\137" \
    36.7 +"\137\040\134\040\040\057\040\137\040\134\040\012\040\040\134\040\040\057" \
    36.8 +"\057\040\137\040\134\040\047\137\040\134\040\040\040\040\137\137\051\040" \
    36.9 +"\174\174\040\174\040\174\040\174\012\040\040\057\040\040\134\040\040\137" \
   36.10 +"\137\057\040\174\040\174\040\174\040\040\057\040\137\137\057\040\174\040" \
   36.11 +"\174\137\174\040\174\012\040\057\137\057\134\137\134\137\137\137\174\137" \
   36.12 +"\174\040\174\137\174\040\174\137\137\137\137\137\050\137\051\137\137\137" \
   36.13 +"\057\040\012\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" \
   36.14 +"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\012" \
   36.15 +
    37.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.2 +++ b/xen/include/xen/compile.h.in	Tue Jan 25 01:36:09 2005 +0000
    37.3 @@ -0,0 +1,13 @@
    37.4 +#define XEN_COMPILE_DATE	"@@date@@"
    37.5 +#define XEN_COMPILE_TIME	"@@time@@"
    37.6 +#define XEN_COMPILE_BY		"@@whoami@@"
    37.7 +#define XEN_COMPILE_DOMAIN	"@@domain@@"
    37.8 +#define XEN_COMPILE_HOST	"@@hostname@@"
    37.9 +#define XEN_COMPILER		"@@compiler@@"
   37.10 +
   37.11 +#define XEN_VERSION		@@version@@
   37.12 +#define XEN_SUBVERSION		@@subversion@@
   37.13 +#define XEN_EXTRAVERSION	@@extraversion@@
   37.14 +
   37.15 +#define XEN_CHANGESET		"@@changeset@@"
   37.16 +#define XEN_BANNER		\