ia64/xen-unstable

view Makefile @ 15805:8f1c807ace97

[ACM/XEND] Fix case where resource label file does not exist.

Fix the case where the resource label file does not exist but its
contents would be needed for access control evaluations.

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