aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>2004-11-15 10:56:35 +0000
committerkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>2004-11-15 10:56:35 +0000
commit2ccd2269e200b64c9bef019e73966d9ea5bae6e0 (patch)
tree14be57754ae292e7933a1c64d76290196f968f72
parentd81588d7ce68cb5ef6f3f9c58bb420f1cb4573dd (diff)
downloadxen-2ccd2269e200b64c9bef019e73966d9ea5bae6e0.tar.gz
xen-2ccd2269e200b64c9bef019e73966d9ea5bae6e0.tar.bz2
xen-2ccd2269e200b64c9bef019e73966d9ea5bae6e0.zip
bitkeeper revision 1.1159.170.23 (41988b637H-s7zBc_EhrKCZog7CGNw)
Clean up multi-kernel build system.
-rw-r--r--Makefile46
-rw-r--r--buildconfigs/Rules.mk21
2 files changed, 30 insertions, 37 deletions
diff --git a/Makefile b/Makefile
index b5cb717dad..a3675f7634 100644
--- a/Makefile
+++ b/Makefile
@@ -5,25 +5,23 @@
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
+KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
+# linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
-#KERNELS ?= mk.linux-2.6-xen0 mk.linux-2.6-xenU mk.linux-2.4-xen0 mk.linux-2.4-xenU mk.netbsd-2.0-xenU
-KERNELS ?= mk.linux-2.6-xen0 mk.linux-2.6-xenU
-
-ALLKERNELS = $(patsubst buildconfigs/%,%,$(wildcard buildconfigs/mk.*))
+ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
-export INSTALL_DIR SOURCEFORGE_MIRROR
+export INSTALL_DIR
+
+include buildconfigs/Rules.mk
.PHONY: all dist install xen tools kernels docs world clean mkpatches mrproper
.PHONY: kbuild kdelete kclean
-all: dist
+all: dist
# build and install everything into local dist directory
-dist: xen tools kernels docs
+dist: xen tools kernels docs
install -m0644 ./COPYING $(DIST_DIR)
install -m0644 ./README $(DIST_DIR)
install -m0755 ./install.sh $(DIST_DIR)
@@ -47,27 +45,27 @@ xen:
tools:
$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
-# Build all the various kernels and modules
kernels:
- for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i build ; done
+ for i in $(KERNELS) ; do $(MAKE) $$i-build ; done
docs:
sh ./docs/check_pkgs && \
$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true
+# Build all the various kernels and modules
kbuild: kernels
# Delete the kernel build trees entirely
kdelete:
- for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i delete ; done
+ for i in $(KERNELS) ; do $(MAKE) $$i-delete ; done
# Clean the kernel build trees
kclean:
- for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i clean ; done
+ for i in $(KERNELS) ; do $(MAKE) $$i-clean ; done
# Make patches from kernel sparse trees
mkpatches:
- for i in $(ALLSPARSETREES) ; do $(MAKE) -f buildconfigs/Rules.mk $$i-xen.patch ; done
+ for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch ; done
# build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
@@ -87,8 +85,8 @@ clean:
# clean, but blow away kernel build tree plus tar balls
mrproper: clean
rm -rf dist patches/tmp
- for i in $(ALLKERNELS) ; do $(MAKE) -f buildconfigs/$$i delete ; done
- for i in $(ALLSPARSETREES) ; do $(MAKE) -f buildconfigs/Rules.mk $$i-mrproper ; done
+ for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
+ for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
install-twisted:
wget http://www.twistedmatrix.com/products/get-current.epy
@@ -113,16 +111,14 @@ uninstall:
cp -a /etc/xen /etc/xen.old && rm -rf /etc/xen
rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*"
-# Legacy target for compatibility
+# Legacy targets for compatibility
linux24:
- $(MAKE) -f buildconfigs/mk.linux-2.4-xen0 build
- $(MAKE) -f buildconfigs/mk.linux-2.4-xenU build
+ $(MAKE) linux-2.4-xen0-build
+ $(MAKE) linux-2.4-xenU-build
-# Legacy target for compatibility
linux26:
- $(MAKE) -f buildconfigs/mk.linux-2.6-xen0 build
- $(MAKE) -f buildconfigs/mk.linux-2.6-xenU build
+ $(MAKE) linux-2.6-xen0-build
+ $(MAKE) linux-2.6-xenU-build
-# Legacy target for compatibility
netbsd20:
- $(MAKE) -f buildconfigs/mk.netbsd-2.0-xenU build
+ $(MAKE) netbsd-2.0-xenU-build
diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk
index 31e8c8e8c7..3fbef08e19 100644
--- a/buildconfigs/Rules.mk
+++ b/buildconfigs/Rules.mk
@@ -1,17 +1,10 @@
-# We expect these two to already be set if people
-# are using the top-level Makefile
-DIST_DIR ?= $(shell pwd)/dist
-INSTALL_DIR ?= $(DIST_DIR)/install
-
.PHONY: mkpatches mrproper
-
# Setup pristine search path
PRISTINE_SRC_PATH ?= .:..
vpath pristine-% $(PRISTINE_SRC_PATH)
-
# Expand Linux series to Linux version
LINUX_SERIES ?= 2.6
LINUX_VER ?= $(patsubst linux-%-xen-sparse,%,$(wildcard linux-$(LINUX_SERIES)*-xen-sparse))
@@ -26,8 +19,6 @@ linux-%.tar.bz2:
@echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
wget http://www.kernel.org/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
-
-
# Expand NetBSD release to NetBSD version
NETBSD_RELEASE ?= 2.0
NETBSD_VER ?= $(patsubst netbsd-%-xen-sparse,%,$(wildcard netbsd-$(NETBSD_RELEASE)*-xen-sparse))
@@ -45,9 +36,6 @@ netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2:
netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
ln -fs $< $@
-
-
-
pristine-%: %.tar.bz2
rm -rf tmp-$(@F) $@
mkdir -p tmp-$(@F)
@@ -56,6 +44,15 @@ pristine-%: %.tar.bz2
touch $@ # update timestamp to avoid rebuild
@rm -rf tmp-$(@F)
+%-build:
+ $(MAKE) -f buildconfigs/mk.$* build
+
+%-delete:
+ $(MAKE) -f buildconfigs/mk.$* delete
+
+%-clean:
+ $(MAKE) -f buildconfigs/mk.$* clean
+
%-xen.patch: pristine-%
rm -rf tmp-$@
cp -al $< tmp-$@