ia64/xen-unstable

annotate Makefile @ 10710:800261a88275

[XEND] Prevent uuid double use.

A check_uuid() in this patch checks on uuid of the
VM configuration definition. If specified uuid is
already used with the others VM, the xm create command
does not create the VM. The xm create command error occurs.

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