ia64/xen-unstable

view Makefile @ 10595:40e1a7749208

[XM] When two or more domain parameters are given, the xm reboot
command doesn't give a command error. This problem is also
included in the xm shutdown command.

This patch checks on domain parameter. If two or more domain
parameters are given, the command error occurs.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jun 29 14:25:35 2006 +0100 (2006-06-29)
parents 7154e0416313
children ef80b6e4e03a
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 KERNELS ?= linux-2.6-xen
6 # You may use wildcards in the above e.g. KERNELS=*2.6*
8 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
10 # Export target architecture overrides to Xen and Linux sub-trees.
11 ifneq ($(XEN_TARGET_ARCH),)
12 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
13 export XEN_TARGET_ARCH SUBARCH XEN_SYSTYPE
14 endif
16 # Default target must appear before any include lines
17 .PHONY: all
18 all: dist
20 export XEN_ROOT=$(CURDIR)
21 include Config.mk
22 include buildconfigs/Rules.mk
24 ifeq ($(XEN_TARGET_X86_PAE),y)
25 export pae=y
26 endif
28 # build and install everything into the standard system directories
29 .PHONY: install
30 install: install-xen install-kernels install-tools install-docs
32 .PHONY: build
33 build: kernels
34 $(MAKE) -C xen build
35 $(MAKE) -C tools build
36 $(MAKE) -C docs build
38 # The test target is for unit tests that can run without an installation. Of
39 # course, many tests require a machine running Xen itself, and these are
40 # handled elsewhere.
41 .PHONY: test
42 test:
43 $(MAKE) -C tools/python test
45 # build and install everything into local dist directory
46 .PHONY: dist
47 dist: DESTDIR=$(DISTDIR)/install
48 dist: dist-xen dist-kernels dist-tools dist-docs
49 $(INSTALL_DIR) $(DISTDIR)/check
50 $(INSTALL_DATA) ./COPYING $(DISTDIR)
51 $(INSTALL_DATA) ./README $(DISTDIR)
52 $(INSTALL_PROG) ./install.sh $(DISTDIR)
53 $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
54 dist-%: DESTDIR=$(DISTDIR)/install
55 dist-%: install-%
56 @: # do nothing
58 # Legacy dist targets
59 .PHONY: xen tools kernels docs
60 xen: dist-xen
61 tools: dist-tools
62 kernels: dist-kernels
63 docs: dist-docs
65 .PHONY: prep-kernels
66 prep-kernels:
67 for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
69 .PHONY: install-xen
70 install-xen:
71 $(MAKE) -C xen install
73 .PHONY: install-tools
74 install-tools:
75 $(MAKE) -C tools install
77 .PHONY: install-kernels
78 install-kernels:
79 for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
81 .PHONY: install-docs
82 install-docs:
83 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
85 .PHONY: dev-docs
86 dev-docs:
87 $(MAKE) -C docs dev-docs
89 # Build all the various kernels and modules
90 .PHONY: kbuild
91 kbuild: kernels
93 # Delete the kernel build trees entirely
94 .PHONY: kdelete
95 kdelete:
96 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
98 # Clean the kernel build trees
99 .PHONY: kclean
100 kclean:
101 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
103 # Make patches from kernel sparse trees
104 .PHONY: mkpatches
105 mkpatches:
106 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch; done
108 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
109 # and place them in the install directory. 'make install' should then
110 # copy them to the normal system directories
111 .PHONY: world
112 world:
113 $(MAKE) clean
114 $(MAKE) kdelete
115 $(MAKE) dist
117 # clean doesn't do a kclean
118 .PHONY: clean
119 clean::
120 $(MAKE) -C xen clean
121 $(MAKE) -C tools clean
122 $(MAKE) -C docs clean
124 # clean, but blow away kernel build tree plus tarballs
125 .PHONY: distclean
126 distclean:
127 $(MAKE) -C xen distclean
128 $(MAKE) -C tools distclean
129 $(MAKE) -C docs distclean
130 rm -rf dist patches/tmp
131 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
132 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
134 # Linux name for GNU distclean
135 .PHONY: mrproper
136 mrproper: distclean
138 .PHONY: help
139 help:
140 @echo 'Installation targets:'
141 @echo ' install - build and install everything'
142 @echo ' install-xen - build and install the Xen hypervisor'
143 @echo ' install-tools - build and install the control tools'
144 @echo ' install-kernels - build and install guest kernels'
145 @echo ' install-docs - build and install user documentation'
146 @echo ''
147 @echo 'Building targets:'
148 @echo ' dist - build and install everything into local dist directory'
149 @echo ' world - clean everything, delete guest kernel build'
150 @echo ' trees then make dist'
151 @echo ' xen - build and install Xen hypervisor'
152 @echo ' tools - build and install tools'
153 @echo ' kernels - build and install guest kernels'
154 @echo ' kbuild - synonym for make kernels'
155 @echo ' docs - build and install user documentation'
156 @echo ' dev-docs - build developer-only documentation'
157 @echo ''
158 @echo 'Cleaning targets:'
159 @echo ' clean - clean the Xen, tools and docs (but not guest kernel trees)'
160 @echo ' distclean - clean plus delete kernel build trees and'
161 @echo ' local downloaded files'
162 @echo ' kdelete - delete guest kernel build trees'
163 @echo ' kclean - clean guest kernel build trees'
164 @echo ''
165 @echo 'Miscellaneous targets:'
166 @echo ' prep-kernels - prepares kernel directories, does not build'
167 @echo ' mkpatches - make patches against vanilla kernels from'
168 @echo ' sparse trees'
169 @echo ' uninstall - attempt to remove installed Xen tools'
170 @echo ' (use with extreme care!)'
171 @echo
172 @echo 'Environment:'
173 @echo ' XEN_PYTHON_NATIVE_INSTALL=y'
174 @echo ' - native python install or dist'
175 @echo ' install into prefix/lib/python<VERSION>'
176 @echo ' instead of <PREFIX>/lib/python'
177 @echo ' true if set to non-empty value, false otherwise'
179 # Use this target with extreme care!
180 .PHONY: uninstall
181 uninstall: D=$(DESTDIR)
182 uninstall:
183 [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
184 rm -rf $(D)/etc/init.d/xend*
185 rm -rf $(D)/etc/hotplug/xen-backend.agent
186 rm -f $(D)/etc/udev/rules.d/xen-backend.rules
187 rm -f $(D)/etc/udev/xen-backend.rules
188 rm -f $(D)/etc/sysconfig/xendomains
189 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
190 rm -rf $(D)/boot/*xen*
191 rm -rf $(D)/lib/modules/*xen*
192 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/lomount
193 rm -rf $(D)/usr/bin/cpuperf-perfcntr $(D)/usr/bin/cpuperf-xen
194 rm -rf $(D)/usr/bin/xc_shadow
195 rm -rf $(D)/usr/bin/pygrub
196 rm -rf $(D)/usr/bin/setsize $(D)/usr/bin/tbctl
197 rm -rf $(D)/usr/bin/xsls
198 rm -rf $(D)/usr/include/xenctrl.h $(D)/usr/include/xenguest.h
199 rm -rf $(D)/usr/include/xs_lib.h $(D)/usr/include/xs.h
200 rm -rf $(D)/usr/include/xen
201 rm -rf $(D)/usr/$(LIBDIR)/libxenctrl* $(D)/usr/$(LIBDIR)/libxenguest*
202 rm -rf $(D)/usr/$(LIBDIR)/libxenstore*
203 rm -rf $(D)/usr/$(LIBDIR)/python/xen $(D)/usr/$(LIBDIR)/python/grub
204 rm -rf $(D)/usr/$(LIBDIR)/xen/
205 rm -rf $(D)/usr/lib/xen/
206 rm -rf $(D)/usr/local/sbin/setmask $(D)/usr/local/sbin/xen*
207 rm -rf $(D)/usr/sbin/xen* $(D)/usr/sbin/netfix $(D)/usr/sbin/xm
208 rm -rf $(D)/usr/share/doc/xen
209 rm -rf $(D)/usr/share/xen
210 rm -rf $(D)/usr/share/man/man1/xen*
211 rm -rf $(D)/usr/share/man/man8/xen*
213 # Legacy targets for compatibility
214 .PHONY: linux26
215 linux26:
216 $(MAKE) 'KERNELS=linux-2.6*' kernels