ia64/xen-unstable

view buildconfigs/mk.netbsd-2.0-xenU @ 2860:61d139354129

bitkeeper revision 1.1159.157.1 (418934b0-qzq3Mn8ZcEAFEUYycHb2Q)

Device section fixes.
author akw27@labyrinth.cl.cam.ac.uk
date Wed Nov 03 19:42:40 2004 +0000 (2004-11-03)
parents 42df95ee8ac3
children 9e8025840eed 23cadd2f9146 fb24f726e556
line source
2 NETBSD_RELEASE ?= 2.0
4 EXTRAVERSION = xenU
6 FULLVERSION = $(NETBSD_VER)-$(EXTRAVERSION)
8 NETBSD_DIR = netbsd-$(FULLVERSION)
10 .PHONY: build clean mrproper mkpatch
12 include buildconfigs/Rules.mk
14 NETBSD_VER ?= $(shell ( /bin/ls -ld netbsd-$(NETBSD_RELEASE)*-xen-sparse ) 2>/dev/null | \
15 sed -e 's!^.*netbsd-\(.\+\)-xen-sparse!\1!' )
16 NETBSD_CVSSNAP ?= 20040906
17 NETBSD_SRC_PATH ?= .:..
18 NETBSD_SRC ?= $(firstword $(foreach dir,$(subst :, ,$(NETBSD_SRC_PATH)),\
19 $(wildcard $(dir)/netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.*z*)))
20 NETBSD_TOOLS_SRC ?= $(firstword $(foreach dir,$(subst :, ,$(NETBSD_SRC_PATH)),\
21 $(wildcard $(dir)/netbsd-$(NETBSD_VER)-tools.tar.*z*)))
23 build: $(NETBSD_DIR) netbsd-$(EXTRAVERSION)
25 netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2:
26 ifeq ($(NETBSD_SRC),)
27 @echo "Cannot find netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.gz in path $(NETBSD_SRC_PATH)"
28 @wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2 -O./netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
29 NETBSD_SRC := ./netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
30 endif
32 pristine-netbsd-$(NETBSD_VER): $(NETBSD_SRC)
33 rm -rf tmp-netbsd-$(NETBSD_VER) $@ && \
34 mkdir -p tmp-netbsd-$(NETBSD_VER) && \
35 tar -C tmp-netbsd-$(NETBSD_VER) -jxf $(NETBSD_SRC) && \
36 mv tmp-netbsd-$(NETBSD_VER)/* $@
37 touch $@ # update timestamp to avoid rebuild
38 @rm -rf tmp-netbsd-$(NETBSD_VER)
40 pristine-netbsd-tools-src:
41 ifeq ($(NETBSD_TOOLS_SRC),)
42 @echo "Cannot find netbsd-$(NETBSD_VER)-tools.tar.gz in path $(NETBSD_SRC_PATH)"
43 @wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/netbsd-$(NETBSD_VER)-tools.tar.bz2 -O./netbsd-$(NETBSD_VER)-tools.tar.bz2
44 NETBSD_TOOLS_SRC := ./netbsd-$(NETBSD_VER)-tools.tar.bz2
45 endif
47 netbsd-tools: pristine-netbsd-tools-src
48 @[ -d netbsd-$(NETBSD_RELEASE)-tools ] || { \
49 echo extract $(NETBSD_TOOLS_SRC); \
50 tar -jxf $(NETBSD_TOOLS_SRC); }
52 $(NETBSD_DIR): netbsd-tools pristine-netbsd-$(NETBSD_VER)
53 $(RM) -rf $(NETBSD_DIR)
54 cp -al pristine-netbsd-$(NETBSD_VER) $(NETBSD_DIR)
55 # Apply arch-xen patches
56 ( cd netbsd-$(NETBSD_VER)-xen-sparse ; \
57 ./mkbuildtree ../$(NETBSD_DIR) )
59 # build the specified netbsd tree
60 netbsd-xen%:
61 $(MAKE) -C netbsd-$(FULLVERSION) config
62 $(MAKE) -C netbsd-$(FULLVERSION) netbsd
63 $(MAKE) -C netbsd-$(FULLVERSION) INSTALL_PATH=$(INSTALL_DIR) INSTALL_NAME=boot/netbsd-$(NETBSD_VER)-$(subst netbsd-,,$@) install
65 clean:
66 $(MAKE) -C netbsd-$(FULLVERSION) clean
68 delete:
69 rm -rf tmp-netbsd-$(NETBSD_VER) $(NETBSD_DIR)