]> xenbits.xensource.com Git - xen.git/commitdiff
bitkeeper revision 1.1159.1.340 (4187f582gn4AZ67FyEzNonoTpbod3w)
authorkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>
Tue, 2 Nov 2004 21:00:50 +0000 (21:00 +0000)
committerkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>
Tue, 2 Nov 2004 21:00:50 +0000 (21:00 +0000)
Fix 'make dist' so that it creates a dist/ directory suitable for turning
into a binary-only distribution tarball.

BitKeeper/etc/ignore
Makefile
install.sh

index 50dbe38b24416620ec795cc298f8c222ab1572a1..46edd6f62d80c67ec58349a8414540f32944d36b 100644 (file)
@@ -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
index d357cebf634233d6b72019fcbed3b154e4bc92d9..aac39d5498a5159948a92dbbecb447866a916f5c 100644 (file)
--- 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
index 2c8f38f06dc21962bc21896efd7f87040a4db60d..6e12009660a6a1530c4fa545c3b0b96e7a7db2f1 100755 (executable)
@@ -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