From b37cf37288acf290431f9a7f8b1c6b91a1020540 Mon Sep 17 00:00:00 2001 From: "kaf24@freefall.cl.cam.ac.uk" Date: Tue, 2 Nov 2004 21:00:50 +0000 Subject: bitkeeper revision 1.1159.1.340 (4187f582gn4AZ67FyEzNonoTpbod3w) Fix 'make dist' so that it creates a dist/ directory suitable for turning into a binary-only distribution tarball. --- BitKeeper/etc/ignore | 2 +- Makefile | 14 +++++++++----- install.sh | 23 ++++++++++++++--------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/BitKeeper/etc/ignore b/BitKeeper/etc/ignore index 50dbe38b24..46edd6f62d 100644 --- a/BitKeeper/etc/ignore +++ b/BitKeeper/etc/ignore @@ -42,7 +42,7 @@ docs/user/labels.pl docs/user/user.css docs/user/user.html extras/mini-os/h/hypervisor-ifs -install/* +dist/* linux-*-xen0/* linux-*-xenU/* linux-xen-sparse diff --git a/Makefile b/Makefile index d357cebf63..aac39d5498 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,14 @@ # Grand Unified Makefile for Xen. # -INSTALL_DIR ?= $(shell pwd)/install +DIST_DIR ?= $(shell pwd)/dist +INSTALL_DIR ?= $(DIST_DIR)/install SOURCEFORGE_MIRROR := http://heanet.dl.sourceforge.net/sourceforge #http://voxel.dl.sourceforge.net/sourceforge/ #http://easynews.dl.sourceforge.net/sourceforge -.PHONY: docs delete-symlinks clean +.PHONY: docs delete-symlinks clean all install dist # a not partcularly useful but safe default target all: @@ -22,13 +23,16 @@ install: dist $(MAKE) -C xen install $(MAKE) -C tools install sh ./docs/check_pkgs && $(MAKE) -C docs install - $(shell cp -dR install/boot/*$(LINUX_VER)* /boot/) - $(shell cp -dR install/lib/modules/* /lib/modules/) + $(shell cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/) + $(shell cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/) # install xen and tools into the install directory dist: all $(MAKE) linux-xenU $(MAKE) linux-xen0 + install -m0644 ./COPYING $(DIST_DIR) + install -m0644 ./README $(DIST_DIR) + install -m0755 ./install.sh $(DIST_DIR) LINUX_RELEASE ?= 2.6 LINUX_VER ?= $(shell ( /bin/ls -ld linux-$(LINUX_RELEASE).*-xen-sparse ) 2>/dev/null | \ @@ -202,7 +206,7 @@ clean: # clean, but blow away linux build tree plus src tar ball mrproper: clean - rm -rf install/* patches $(LINUX_TREES) linux-$(LINUX_VER).tar.* + rm -rf dist patches $(LINUX_TREES) linux-$(LINUX_VER).tar.* install-twisted: wget http://www.twistedmatrix.com/products/get-current.epy diff --git a/install.sh b/install.sh index 2c8f38f06d..6e12009660 100755 --- a/install.sh +++ b/install.sh @@ -1,24 +1,29 @@ #!/bin/sh -if ! [ -d ./install ]; then - echo "ERROR: You must build Xen before it can be installed." - echo " For example, 'make dist'." +src='./install' +if [ -d ./dist ]; then + src='./dist/install' +fi + +if ! [ -d $src ]; then + echo "ERROR: Could not find a valid distribution directory." + echo " If this is a source-only release, try 'make dist'." exit 1 fi -prefix='/' +dst='/' if [ $# -ne 0 ]; then - prefix=$1 + dst=$1 fi -if ! [ -d $prefix ]; then +if ! [ -d $dst ]; then echo "ERROR: You must specify a valid install directory." - echo " The specified directory '$prefix' is not valid." + echo " The specified directory '$dst' is not valid." exit 1 fi -echo "Installing Xen to '$prefix'..." -cp -fdR ./install/* $prefix +echo "Installing Xen from '$src' to '$dst'..." +cp -fdR $src/* $dst echo "All done." exit 0 -- cgit v1.2.3