diff options
author | Ian Campbell <ian.campbell@xensource.com> | 2007-05-25 11:03:40 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@xensource.com> | 2007-05-25 11:03:40 +0100 |
commit | 7a35a3f0b5f668c9b7cdb289293977543735829d (patch) | |
tree | 918cd9544da671d782901f595d5f3fc1b887815c /buildconfigs/Rules.mk | |
parent | 4117d5c1dbca483edcc2bb1b9430f87f122d9bc4 (diff) | |
download | xen-7a35a3f0b5f668c9b7cdb289293977543735829d.tar.gz xen-7a35a3f0b5f668c9b7cdb289293977543735829d.tar.bz2 xen-7a35a3f0b5f668c9b7cdb289293977543735829d.zip |
Factor out sparse tree makefile fragments and introduce hg-clone and
tarball methods in preparation for migrating away from the sparse tree
layout.
This re-introduces 14883:6568c1882af5 and 14862:98efd2e410ae plus
further fixes.
Also add makefile fragments to support building the paravirt ops tree
(make linux-2.6-paravirt-build).
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Diffstat (limited to 'buildconfigs/Rules.mk')
-rw-r--r-- | buildconfigs/Rules.mk | 95 |
1 files changed, 3 insertions, 92 deletions
diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk index ae61ea0095..49ef8fe21d 100644 --- a/buildconfigs/Rules.mk +++ b/buildconfigs/Rules.mk @@ -3,79 +3,9 @@ include Config.mk export DESTDIR -# Choose the best mirror to download linux kernel -KERNEL_REPO = http://www.kernel.org - ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*)) ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse)) -# Setup pristine search path -PRISTINE_SRC_PATH ?= .:.. -vpath pristine-% $(PRISTINE_SRC_PATH) - -# Let XEN_TARGET_ARCH override ARCH. -ifeq ($(XEN_TARGET_ARCH),x86_32) -LINUX_ARCH ?= i386 -else -LINUX_ARCH ?= $(XEN_TARGET_ARCH) -endif - -# Expand Linux series to Linux version -LINUX_SERIES ?= 2.6 -LINUX_VER ?= $(shell grep "^LINUX_VER " buildconfigs/mk.linux-2.6-xen | sed -e 's/.*=[ ]*//') - -# Setup Linux search path -LINUX_SRC_PATH ?= .:.. -vpath linux-%.tar.bz2 $(LINUX_SRC_PATH) -vpath patch-%.bz2 $(LINUX_SRC_PATH) - -# download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH -linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*)) -linux-%.tar.bz2: - @echo "Cannot find $@ in path $(LINUX_SRC_PATH)" - wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@ - -patch-%.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$(*F))).$(word 2,$(subst ., ,$(*F))) -patch-%.bz2: override _LINUX_XDIR = $(if $(word 3,$(subst -, ,$(*F))),snapshots,testing) -patch-%.bz2: - @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)" - wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@ - -pristine-%: pristine-%/.valid-pristine - @true - -pristine-%/.valid-pristine: %.tar.bz2 - rm -rf tmp-pristine-$* $(@D) - mkdir -p tmp-pristine-$* - tar -C tmp-pristine-$* -jxf $< - -@rm -f tmp-pristine-$*/pax_global_header - mv tmp-pristine-$*/* $(@D) - @rm -rf tmp-pristine-$* - touch $(@D)/.hgskip - touch $@ # update timestamp to avoid rebuild - -PATCHDIRS := $(wildcard patches/*-*) - -ifneq ($(PATCHDIRS),) --include $(patsubst %,%/.makedep,$(PATCHDIRS)) - -$(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep: - @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@ - -ref-%/.valid-ref: pristine-%/.valid-pristine - set -e - rm -rf $(@D) - cp -al $(<D) $(@D) - if [ -d patches/$* ] ; then \ - echo Applying patches from patches/$*... ; \ - for i in $$(cat patches/$*/series) ; do \ - echo ... $$i ; \ - patch -d $(@D) -p1 --quiet <patches/$*/$$i || exit 1 ; \ - done ; \ - fi - touch $@ # update timestamp to avoid rebuild -endif - %-install: $(MAKE) -f buildconfigs/mk.$* build @@ -101,32 +31,13 @@ endif %-clean: $(MAKE) -f buildconfigs/mk.$* clean -linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref - rm -rf tmp-$@ - cp -al $(<D) tmp-$@ - ( cd linux-2.6-xen-sparse && bash ./mkbuildtree ../tmp-$@ ) - diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true - rm -rf tmp-$@ - -%-xen.patch: ref-%/.valid-ref - rm -rf tmp-$@ - cp -al $(<D) tmp-$@ - ( cd $*-xen-sparse && bash ./mkbuildtree ../tmp-$@ ) - diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true - rm -rf tmp-$@ +%.patch: + $(MAKE) -f buildconfigs/mk.$* $@ %-mrproper: - $(MAKE) -f buildconfigs/mk.$*-xen mrpropper + $(MAKE) -f buildconfigs/mk.$*-xen mrproper rm -rf pristine-$(*)* ref-$(*)* rm -rf $*-xen.patch -.PHONY: config-update-pae -config-update-pae: -ifeq ($(XEN_TARGET_X86_PAE),y) - sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE) -else - grep '^CONFIG_HIGHMEM64G=y' $(CONFIG_FILE) >/dev/null && ( sed -e 's!^CONFIG_HIGHMEM64G=y$$!\# CONFIG_HIGHMEM64G is not set!;s!^\# CONFIG_HIGHMEM4G is not set$$!CONFIG_HIGHMEM4G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE) ) || true -endif - # never delete any intermediate files. .SECONDARY: |