debuggers.hg

view tools/Makefile @ 20939:845d04d505d0

tools: Do not append trailing slash to XEN_ROOT in Makefiles

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 04 09:03:42 2010 +0000 (2010-02-04)
parents 58dbf27875c5
children 82bdaacd5caf
line source
1 XEN_ROOT = ..
2 include $(XEN_ROOT)/tools/Rules.mk
4 SUBDIRS-y :=
5 SUBDIRS-y += check
6 SUBDIRS-y += include
7 SUBDIRS-y += libxc
8 SUBDIRS-y += flask
9 SUBDIRS-$(CONFIG_OCAML_XENSTORED) += ocaml-xenstored
10 SUBDIRS-y += xenstore
11 SUBDIRS-y += misc
12 SUBDIRS-y += examples
13 SUBDIRS-y += hotplug
14 SUBDIRS-y += xentrace
15 SUBDIRS-$(CONFIG_XCUTILS) += xcutils
16 SUBDIRS-$(CONFIG_X86) += firmware
17 SUBDIRS-$(ACM_SECURITY) += security
18 SUBDIRS-y += console
19 SUBDIRS-y += xenmon
20 SUBDIRS-$(VTPM_TOOLS) += vtpm_manager
21 SUBDIRS-$(VTPM_TOOLS) += vtpm
22 SUBDIRS-y += xenstat
23 SUBDIRS-$(CONFIG_Linux) += libaio
24 SUBDIRS-$(CONFIG_Linux) += memshr
25 SUBDIRS-$(CONFIG_Linux) += blktap
26 SUBDIRS-$(CONFIG_Linux) += blktap2
27 SUBDIRS-$(CONFIG_NetBSD) += libaio
28 SUBDIRS-$(CONFIG_NetBSD) += blktap2
29 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
30 SUBDIRS-y += libfsimage
31 SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
32 SUBDIRS-$(CONFIG_Linux) += fs-back
33 SUBDIRS-$(CONFIG_NetBSD) += fs-back
34 SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir
35 SUBDIRS-y += xenpmd
36 SUBDIRS-y += libxl
37 SUBDIRS-y += remus
38 SUBDIRS-$(CONFIG_X86) += xenpaging
40 # These don't cross-compile
41 ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
42 SUBDIRS-$(PYTHON_TOOLS) += python
43 SUBDIRS-$(PYTHON_TOOLS) += pygrub
44 endif
46 # For the sake of linking, set the sys-root
47 ifneq ($(CROSS_COMPILE),)
48 CROSS_BIN_PATH ?= /usr/$(CROSS_COMPILE:-=)/bin
49 CROSS_SYS_ROOT ?= /usr/$(CROSS_COMPILE:-=)/sys-root
50 export CROSS_SYS_ROOT # exported for check/funcs.sh
51 export CROSS_BIN_PATH # exported for cross-install.sh
52 endif
54 .PHONY: all
55 all: subdirs-all
57 .PHONY: install
58 install: subdirs-install
59 $(INSTALL_DIR) $(DESTDIR)/var/xen/dump
60 $(INSTALL_DIR) $(DESTDIR)/var/log/xen
61 $(INSTALL_DIR) $(DESTDIR)/var/lib/xen
62 $(INSTALL_DIR) $(DESTDIR)/var/lock/subsys
64 .PHONY: clean distclean
65 clean distclean: subdirs-clean
67 ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
68 IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
69 --cross-prefix=$(CROSS_COMPILE) \
70 --interp-prefix=$(CROSS_SYS_ROOT)
71 endif
73 ioemu/config-host.mak:
74 cd ioemu && XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) sh configure \
75 --prefix=$(PREFIX) $(IOEMU_CONFIGURE_CROSS)
77 subdir-all-ioemu subdir-install-ioemu: ioemu/config-host.mak
79 subdir-clean-ioemu:
80 $(MAKE) -C ioemu distclean
82 ioemu-dir-find:
83 set -ex; \
84 if test -d $(CONFIG_QEMU); then \
85 rm -f ioemu-dir; \
86 ln -sf $(CONFIG_QEMU) ioemu-dir; \
87 else \
88 if [ ! -d ioemu-remote ]; then \
89 rm -rf ioemu-remote ioemu-remote.tmp; \
90 mkdir ioemu-remote.tmp; rmdir ioemu-remote.tmp; \
91 $(GIT) clone $(CONFIG_QEMU) ioemu-remote.tmp; \
92 if [ "$(QEMU_TAG)" ]; then \
93 cd ioemu-remote.tmp; \
94 $(GIT) branch -D dummy >/dev/null 2>&1 ||:; \
95 $(GIT) checkout -b dummy $(QEMU_TAG); \
96 cd ..; \
97 fi; \
98 mv ioemu-remote.tmp ioemu-remote; \
99 fi; \
100 rm -f ioemu-dir; \
101 ln -sf ioemu-remote ioemu-dir; \
102 fi
103 set -e; \
104 $(absolutify_xen_root); \
105 $(buildmakevars2shellvars); \
106 cd ioemu-dir; \
107 ./xen-setup $(IOEMU_CONFIGURE_CROSS)
109 subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find
111 subdir-clean-ioemu-dir:
112 set -e; if test -d ioemu-dir/.; then \
113 $(absolutify_xen_root); \
114 $(buildmakevars2shellvars); \
115 $(MAKE) -C ioemu-dir clean; \
116 fi
118 ocaml-xenstored:
119 set -ex; \
120 rm -rf ocaml-xenstored.tmp; \
121 hg clone $(OCAML_XENSTORED_REPO) ocaml-xenstored.tmp; \
122 if [ "$(OCAML_XENSTORED_TAG)" ]; then \
123 hg -R ocaml-xenstored.tmp update -r $(OCAML_XENSTORED_TAG) ;\
124 hg -R ocaml-xenstored.tmp branch mybranch ;\
125 fi; \
126 mv ocaml-xenstored.tmp ocaml-xenstored; \
128 subdir-all-ocaml-xenstored subdir-install-ocaml-xenstored: ocaml-xenstored
129 $(absolutify_xen_root); \
130 $(MAKE) -C ocaml-xenstored $(patsubst subdir-%-ocaml-xenstored,%,$@);
132 subdir-clean-ocaml-xenstored:
133 set -e; if test -d ocaml-xenstored; then \
134 $(MAKE) -C ocaml-xenstored clean; \
135 fi