ia64/xen-unstable

view Makefile @ 3498:1d24a5b0b338

bitkeeper revision 1.1159.223.25 (41f2cb9aEKMZkZbvqBE0eXhpljlV4Q)

Description: fix path to python
There is no python2 in debian. Instead, use python.

From: Adam Heath <doogie@brainfood.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
author iap10@labyrinth.cl.cam.ac.uk
date Sat Jan 22 21:54:34 2005 +0000 (2005-01-22)
parents 4bbe824cb519
children 78b5439ce414
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 DIST_DIR ?= $(shell pwd)/dist
6 INSTALL_DIR ?= $(DIST_DIR)/install
7 INSTALL := install
8 INSTALL_DIR := $(INSTALL) -d -m0755
9 INSTALL_DATA := $(INSTALL) -m0644
10 INSTALL_PROG := $(INSTALL) -m0755
12 KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
13 # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
14 # You may use wildcards in the above e.g. KERNELS=*2.4*
16 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
17 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
18 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
21 export INSTALL_DIR
23 include buildconfigs/Rules.mk
25 .PHONY: all dist install xen tools kernels docs world clean mkpatches mrproper
26 .PHONY: kbuild kdelete kclean install-tools install-xen install-docs
27 .PHONY: install-kernels
29 all: dist
31 # install everything into the standard system directories
32 # NB: install explicitly does not check that everything is up to date!
33 install: xen.install tools.install kernels docs.install
35 kernels.install:
36 cp -a $(INSTALL_DIR)/boot/* /boot/
37 cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/
38 cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/
39 cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/
41 docs.install:
42 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
44 xen.install tools.install: %.install:
45 $(MAKE) -C $* install
47 xen.dist tools.dist: %.dist:
48 $(MAKE) -C $* dist
50 # build and install everything into local dist directory
51 dist: xen.dist tools.dist kernels docs.install
52 $(INSTALL_DIR) $(DIST_DIR)/check
53 $(INSTALL_DATA) ./COPYING $(DIST_DIR)
54 $(INSTALL_DATA) ./README $(DIST_DIR)
55 $(INSTALL_PROG) ./install.sh $(DIST_DIR)
56 $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DIST_DIR)/check
58 xen:
59 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
61 tools:
62 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
64 kernels: $(addsuffix -build,$(XKERNELS))
66 docs:
67 sh ./docs/check_pkgs && \
68 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true
70 # Build all the various kernels and modules
71 kbuild: kernels
73 # Delete the kernel build trees entirely
74 kdelete: $(addsuffix -clean,$(XKERNELS))
76 # Clean the kernel build trees
77 kclean: $(addsuffix -clean,$(XKERNELS))
79 # Make patches from kernel sparse trees
80 mkpatches: $(addsuffix -xen.patch,$(ALLSPARSETREES))
82 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
83 # and place them in the install directory. 'make install' should then
84 # copy them to the normal system directories
85 world:
86 $(MAKE) clean
87 $(MAKE) kdelete
88 $(MAKE) dist
90 # clean doesn't do a kclean
91 clean: xen.clean tools.clean docs.clean
93 xen.clean tools.clean docs.clean: %.clean:
94 $(MAKE) -C $* clean
96 # clean, but blow away kernel build tree plus tar balls
97 mrproper: clean $(addsuffix -delete,$(ALLKERNELS)) $(addsuffix -mrproper,$(ALLSPARSETREES))
98 rm -rf dist patches/tmp
100 install-twisted:
101 wget http://www.twistedmatrix.com/products/get-current.epy
102 tar -zxf Twisted-*.tar.gz
103 ( cd Twisted-* ; python setup.py install )
105 install-logging: LOGGING=logging-0.4.9.2
106 install-logging:
107 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
108 tar -zxf $(LOGGING).tar.gz
109 ( cd $(LOGGING) && python setup.py install )
111 # handy target to upgrade iptables (use rpm or apt-get in preference)
112 install-iptables:
113 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
114 tar -jxf iptables-*.tar.bz2
115 ( cd iptables-* ; \
116 make PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install)
118 help:
119 @echo 'Installation targets:'
120 @echo ' install - install everything'
121 @echo ' install-xen - install the Xen hypervisor'
122 @echo ' install-tools - install the control tools'
123 @echo ' install-kernels - install guest kernels'
124 @echo ' install-docs - install documentation'
125 @echo ''
126 @echo 'Building targets:'
127 @echo ' dist - build everything and place in dist/'
128 @echo ' world - clean everything, delete guest kernel build'
129 @echo ' trees then make dist'
130 @echo ' xen - build Xen hypervisor and place in dist/'
131 @echo ' tools - build tools and place in dist/'
132 @echo ' kernels - build guest kernels and place in dist/'
133 @echo ' kbuild - synonym for make kernels'
134 @echo ' docs - build docs and place in dist/'
135 @echo ''
136 @echo 'Cleaning targets:'
137 @echo ' clean - clean the Xen, tools and docs (but not'
138 @echo ' guest kernel) trees'
139 @echo ' mrproper - clean plus delete kernel tarballs and kernel'
140 @echo ' build trees'
141 @echo ' kdelete - delete guest kernel build trees'
142 @echo ' kclean - clean guest kernel build trees'
143 @echo ''
144 @echo 'Dependency installation targets:'
145 @echo ' install-twisted - install the Twisted Matrix Framework'
146 @echo ' install-logging - install the Python Logging package'
147 @echo ' install-iptables - install iptables tools'
148 @echo ''
149 @echo 'Miscellaneous targets:'
150 @echo ' mkpatches - make patches against vanilla kernels from'
151 @echo ' sparse trees'
152 @echo ' uninstall - attempt to remove installed Xen tools (use'
153 @echo ' with extreme care!)'
155 # Use this target with extreme care!
156 uninstall:
157 cp -a /etc/xen /etc/xen.old && rm -rf /etc/xen
158 rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*"
160 # Legacy targets for compatibility
161 linux24: linux-2.4-xen0-build linux-2.4-xenU-build
163 linux26: linux-2.6-xen0-build linux-2.6-xenU-build
165 netbsd20: netbsd-2.0-xenU-build