aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-10-05 15:05:38 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-10-05 15:05:38 +0100
commitd56d69a03289696afdf4057d1449b21f23ca6802 (patch)
tree1e81fcce87d8a1bace9512ce44be0b42506dde96 /Makefile
parent878fc540a04191f450745c6a6118d38484ea5b76 (diff)
downloadxen-d56d69a03289696afdf4057d1449b21f23ca6802.tar.gz
xen-d56d69a03289696afdf4057d1449b21f23ca6802.tar.bz2
xen-d56d69a03289696afdf4057d1449b21f23ca6802.zip
Clean up DESTDIR handling. Default install is to root
directory (/). This is only overridden automatically for the 'make dist' targets and their legacy aliases (make {xen,tools,kernels,docs}). Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 15 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 91ee5b043a..b093417839 100644
--- a/Makefile
+++ b/Makefile
@@ -37,23 +37,33 @@ build: kernels
$(MAKE) -C docs build
# build and install everything into local dist directory
-dist: xen kernels tools docs
+dist: DESTDIR=$(DISTDIR)/install
+dist: dist-xen dist-kernels dist-tools dist-docs
$(INSTALL_DIR) $(DISTDIR)/check
$(INSTALL_DATA) ./COPYING $(DISTDIR)
$(INSTALL_DATA) ./README $(DISTDIR)
$(INSTALL_PROG) ./install.sh $(DISTDIR)
$(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
+dist-%: DESTDIR=$(DISTDIR)/install
+dist-%: install-%
+ @: # do nothing
+
+# Legacy dist targets
+xen: dist-xen
+tools: dist-tools
+kernels: dist-kernels
+docs: dist-docs
-xen:
+install-xen:
$(MAKE) -C xen install
-tools:
+install-tools:
$(MAKE) -C tools install
-kernels:
+install-kernels:
for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
-docs:
+install-docs:
sh ./docs/check_pkgs && $(MAKE) -C docs install || true
dev-docs:
@@ -109,10 +119,6 @@ install-iptables:
tar -jxf iptables-1.2.11.tar.bz2
$(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
-install-%: DESTDIR=
-install-%: %
- @: # do nothing
-
help:
@echo 'Installation targets:'
@echo ' install - build and install everything'
@@ -151,7 +157,6 @@ help:
@echo ' with extreme care!)'
# Use this target with extreme care!
-uninstall: DESTDIR=
uninstall: D=$(DESTDIR)
uninstall:
[ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true