Horms
2006-Jun-28 02:04 UTC
[Xen-devel] [PATCH] build: clean up kclean and distclean for kernel
* Don''t delete non-existent %.tar.bz2 in buildconfigs/Rules.mk''s %-mrproper * Add a mrpropper target to buildconfigs/mk.linux-2.6-xen, and have this delete the local patch and tarball * Make distclean depend on kdekete, rather than calling delete target by hand * Stop kclean from erroring out if the kernel directory doesn''t exist * Remove patches/*/.makedep in top level Makefile rather than in buildconfigs/Rules.mk, as calling rules in the latter causes patches/*/.make to be created (Magnus) Signed-Off-By: Magnus Damm <magnus@valinux.co.jp> Signed-Off-By: Horms <horms@verge.net.au> --- from-0001/Makefile +++ to-work/Makefile 2006-06-28 10:54:02.000000000 +0900 @@ -123,13 +123,13 @@ clean:: # clean, but blow away kernel build tree plus tarballs .PHONY: distclean -distclean: +distclean: kdelete $(MAKE) -C xen distclean $(MAKE) -C tools distclean $(MAKE) -C docs distclean rm -rf dist patches/tmp - for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done + rm -rf patches/*/.makedep # Linux name for GNU distclean .PHONY: mrproper --- from-0001/buildconfigs/Rules.mk +++ to-work/buildconfigs/Rules.mk 2006-06-28 10:47:15.000000000 +0900 @@ -59,10 +59,6 @@ ifneq ($(PATCHDIRS),) $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep: @echo ''ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)'' >$@ -.PHONY: clean -clean:: - rm -f patches/*/.makedep - ref-%/.valid-ref: pristine-%/.valid-pristine set -e rm -rf $(@D) @@ -111,7 +107,8 @@ linux-2.6-xen.patch: ref-linux-$(LINUX_V rm -rf tmp-$@ %-mrproper: - rm -rf pristine-$(*)* ref-$(*)* $*.tar.bz2 + $(MAKE) -f buildconfigs/mk.$*-xen mrpropper + rm -rf pristine-$(*)* ref-$(*)* rm -rf $*-xen.patch .PHONY: config-update-pae --- from-0001/buildconfigs/mk.linux-2.6-xen +++ to-work/buildconfigs/mk.linux-2.6-xen 2006-06-28 10:47:15.000000000 +0900 @@ -47,8 +47,14 @@ config: $(LINUX_DIR)/include/linux/autoc .PHONY: clean clean:: - $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean + [ ! -d $(LINUX_DIR) ] || \ + $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean + .PHONY: delete delete: rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR) + +.PHONY: mrpropper +mrpropper: + rm -f $(LINUX_SRCS) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Jun-28 12:34 UTC
Re: [Xen-devel] [PATCH] build: clean up kclean and distclean for kernel
On 28 Jun 2006, at 03:04, Horms wrote:> + > +.PHONY: mrpropper > +mrpropper: > + rm -f $(LINUX_SRCS)Where does LINUX_SRCS come from? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Horms
2006-Jun-29 00:00 UTC
Re: [Xen-devel] [PATCH] build: clean up kclean and distclean for kernel
On Wed, Jun 28, 2006 at 01:34:26PM +0100, Keir Fraser wrote:> > On 28 Jun 2006, at 03:04, Horms wrote: > > >+ > >+.PHONY: mrpropper > >+mrpropper: > >+ rm -f $(LINUX_SRCS) > > Where does LINUX_SRCS come from?Ooops, I think thats part of another patch that never got merged. I''ll replace LINUX_SRCS with something more appropriate and repost. -- Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, Jun 29, 2006 at 09:00:44AM +0900, Horms wrote:> On Wed, Jun 28, 2006 at 01:34:26PM +0100, Keir Fraser wrote: > > > > On 28 Jun 2006, at 03:04, Horms wrote: > > > > >+ > > >+.PHONY: mrpropper > > >+mrpropper: > > >+ rm -f $(LINUX_SRCS) > > > > Where does LINUX_SRCS come from? > > Ooops, I think thats part of another patch that never got merged. > I''ll replace LINUX_SRCS with something more appropriate and repost.On further inspection I see that LINUX_SRCS used to exist, but has disapeared since I originally wrote the patch. I will post an update which removes the local tarball using the currently available LINUX_VER variable. I will also post a second patch which reworks how the tarballs and patches are downloaded, in order to make the mirror site configuration more flexible. It also allows the mrpropper to remove the local patch file (if any) more easily. I guess this last bit could be incoporated into the previous patch, but to be honest I am not quite sure why. -- Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Horms
2006-Jun-29 01:26 UTC
[Xen-devel] [PATCH 1/2] build: clean up kclean and distclean for kernel
* Don''t delete non-existent %.tar.bz2 in buildconfigs/Rules.mk''s %-mrproper * Add a mrpropper target to buildconfigs/mk.linux-2.6-xen, and have this delete the local tarball - This should also delete the local patch, if there is one, but I am not sure how to do this with the current incarntation of the code, and I will post a subsequent patch which makes this easier and effects this chang. As there currently is no local patch this is not a big deal at this moment. (Horms) * Make distclean depend on kdekete, rather than calling delete target by hand * Stop kclean from erroring out if the kernel directory doesn''t exist * Remove patches/*/.makedep in top level Makefile rather than in buildconfigs/Rules.mk, as calling rules in the latter causes patches/*/.make to be created (Magnus) Signed-Off-By: Magnus Damm <magnus@valinux.co.jp> Signed-Off-By: Horms <horms@verge.net.au> --- from-0001/Config.mk +++ to-work/Config.mk 2006-06-29 10:11:45.000000000 +0900 @@ -57,7 +57,17 @@ LDFLAGS += $(foreach i, $(EXTRA_LIB), -L CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i)) # Choose the best mirror to download linux kernel -KERNEL_REPO = http://www.kernel.org +DOWNLOAD_PATH_DEFAULT := .:.. +LINUX_REPO_DEFAULT := http://www.kernel.org/pub/linux/kernel/ +ifdef LINUX_SRC_PATH +DOWNLOAD_PATH ?= $(LINUX_SRC_PATH) # Compatibility +else +DOWNLOAD_PATH ?= $(DOWNLOAD_PATH_DEFAULT) +endif +DOWNLOAD_DIR := $(firstword $(subst :, ,$(DOWNLOAD_PATH))) +LINUX_REPO ?= $(LINUX_REPO_DEFAULT) +# LINUX_REPO_KERNEL_PATH Set in buildconfigs/Rules.mk, if not in environment +# LINUX_REPO_PATCH_PATH Set in buildconfigs/Rules.mk, if not in environment # If ACM_SECURITY = y, then the access control module is compiled # into Xen and the policy type can be set by the boot policy file --- from-0002/Makefile +++ to-work/Makefile 2006-06-29 10:11:45.000000000 +0900 @@ -175,6 +175,20 @@ help: @echo '' install into prefix/lib/python<VERSION>'' @echo '' instead of <PREFIX>/lib/python'' @echo '' true if set to non-empty value, false otherwise'' + @echo '' LINUX_REPO=URL - Base URL to download linux kernel from'' + @echo '' Default: "$(LINUX_REPO_DEFAULT)"'' + @echo '' LINUX_REPO_KERNEL_PATH=DIRECTORY'' + @echo '' - LINUX_REPO assumes that the URL has the same directory'' + @echo '' structure as $(LINUX_REPO_DEFAULT)'' + @echo '' and the rest of the path to the tarball is derived.'' + @echo '' If set, override the derivation.'' + @echo '' Default: ""'' + @echo '' LINUX_REPO_PATCHL_PATH=DIRECTORY'' + @echo '' - LINUX_REPO assumes that the URL has the same directory'' + @echo '' structure as $(LINUX_REPO_DEFAULT)'' + @echo '' and the rest of the path to the patches is derived.'' + @echo '' If set, override the derivation.'' + @echo '' Default: ""'' # Use this target with extreme care! .PHONY: uninstall --- from-0002/buildconfigs/Rules.mk +++ to-work/buildconfigs/Rules.mk 2006-06-29 10:11:45.000000000 +0900 @@ -22,32 +22,58 @@ 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) +vpath linux-%.tar.bz2 $(DOWNLOAD_PATH) +vpath patch-%.bz2 $(DOWNLOAD_PATH) # download a pristine Linux kernel tarball if there isn''t one in LINUX_SRC_PATH +ifndef LINUX_REPO_KERNEL_PATH linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*)) +linux-%.tar.bz2: LINUX_REPO_KERNEL_PATH = v$(_LINUX_VDIR) +endif linux-%.tar.bz2: @echo "Cannot find $@ in path $(LINUX_SRC_PATH)" - wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@ + wget $(LINUX_REPO)/$(LINUX_REPO_KERNEL_PATH)/$@ -O$(DOWNLOAD_DIR)/$@ \ + || { rm -f $(DOWNLOAD_DIR)/$@; false; } +ifndef LINUX_REPO_PATCH_PATH 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: LINUX_REPO_PATCH_PATH = v$(_LINUX_VDIR)/$(_LINUX_XDIR) +endif patch-%.bz2: @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)" - wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@ + wget $(LINUX_REPO)/$(LINUX_REPO_PATCH_PATH)/$(@F) \ + -O$(DOWNLOAD_DIR)/$@ || { rm -f $(DOWNLOAD_DIR)/$@; false; } pristine-%: pristine-%/.valid-pristine @true + +# unpack-pristine and patch-pristine targets are run in a submake +# so that vpath is re-evaluated. This is important for the case +# where the files are dowloaded this time around, and they are downloaded +# into an alternate directory, as specified by DOWNLOAD_PATH + +unpack-pristine-%-X: % + tar -C $(UNPACK_DIR) -jxf $< + +patch-pristine-%-X: % + echo $< + bzcat $< | patch -d $(UNPACK_DIR) -p1 + +.PHONY: patch-pristine-dummy +patch-pristine-dummy-X: -pristine-%/.valid-pristine: %.tar.bz2 +pristine-%/.valid-pristine: $(LINUX_TARBALL) $(LINUX_PATCHES) rm -rf tmp-pristine-$* $(@D) mkdir -p tmp-pristine-$* - tar -C tmp-pristine-$* -jxf $< - -@rm -f tmp-pristine-$*/pax_global_header + @# firstword is used to get rid of any whitespace + $(MAKE) UNPACK_DIR=tmp-pristine-$* \ + unpack-pristine-$(firstword $(LINUX_TARBALL))-X + -rm -f tmp-pristine-$*/pax_global_header mv tmp-pristine-$*/* $(@D) - @rm -rf tmp-pristine-$* + rm -rf tmp-pristine-$* + $(MAKE) KERNELS=linux-2.6-xen UNPACK_DIR=pristine-$* \ + $(patsubst %, patch-pristine-%-X, dummy $(LINUX_PATCHES)) touch $(@D)/.hgskip touch $@ # update timestamp to avoid rebuild --- from-0003/buildconfigs/mk.linux-2.6-xen +++ to-work/buildconfigs/mk.linux-2.6-xen 2006-06-29 10:14:41.000000000 +0900 @@ -1,5 +1,7 @@ LINUX_SERIES = 2.6 LINUX_VER = 2.6.16.13 +LINUX_TARBALL = linux-2.6.16.13.tar.bz2 # Only one makes sense +#LINUX_PATCHES = patch-2.6.17-rcN.bz2 # Usually zero or one patch EXTRAVERSION ?= xen @@ -57,4 +59,4 @@ delete: .PHONY: mrpropper mrpropper: - rm -f linux-$(LINUX_VER).tar.bz2 + rm -f $(LINUX_TARBALL) $(LINUX_PATCHES) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Horms
2006-Jun-29 01:27 UTC
[Xen-devel] Re: [PATCH 2/2] build: make linux download more flexible
* Allow LINUX_REPO to specify the URL of the repository for the linux kernel, - Defaults is: http://www.kernel.org/pub/linux/kernel/ * Allow LINUX_REPO to be overridden in the environment * LINUX_REPO it should be the path, trimmed to give a structure equivalent to http://www.kernel.org/pub/linux/kernel/ - The kernel tarball will be downloaded from $(LINUX_REPO)/v$(KERNEL_MAJOR).$(KERNEL_MINOR)/ e.g. http://www.kernel.org/pub/linux/kernel/v2.6 Where KERNEL_MAJOR and KERNEL_MINOR are calculated at runtime - The path of the tarball can be overridden using LINUX_REPO_KERNEL_PATH in the environment, in which case the tarball will be downloaded from $(LINUX_REPO)/v$(LINUX_REPO_KERNEL_PATH)/ - If needed kernel patches will be downloaded from $(LINUX_REPO)/v$(KERNEL_MAJOR).$(KERNEL_MINOR)/snapshots if present, else $(LINUX_REPO)/v$(KERNEL_MAJOR).$(KERNEL_MINOR)/testing This will depend on the version of the patch - The path of the tarball can be overridden using LINUX_REPO_KERNEL_PATH in the environment, in which case the patch will be downloaded from $(LINUX_REPO)/v$(LINUX_REPO_PATCH_PATH)/ - The intention of LINUX_REPO_KERNEL_PATH and LINUX_REPO_PATCH_PATH is to allow for sites that don''t follow the directory hierarchy of kernel.org, while simplifying the presumably common case where they do * Previously KERNEL_REPO had similar properties to LINUX_REPO, but it was not as flexible, had a somewhat presumptuous name and could not be overridden in the environment. It has been removed * Allow DOWNLOAD_PATH to set a search path for previously downloaded files - Use the first element of the path as the directory to save downloaded files - Default is LINUX_SRC_PATH if set in environment, else .:.. - Note that kclean-tarball, makedistlcean-* and friends intentionally only remove tarballs in the top level xen directory, regardless of the value of this variable. This is to allow more persistent storage of tarballs in a specified location, which cam be manually cleaned if desired. * Fix bug introduced by xen-unstable.hg:9931:39fa9a75d84b whereby the downloaded kernel source is not removed on mrproper * Remove the local tarball, if any, on mrproper Signed-Off-By: Horms <horms@verge.net.au> Config.mk | 12 ++++++++++- Makefile | 14 +++++++++++++ buildconfigs/Rules.mk | 44 ++++++++++++++++++++++++++++++++--------- buildconfigs/mk.linux-2.6-xen | 4 ++- 4 files changed, 63 insertions(+), 11 deletions(-) --- from-0001/Config.mk +++ to-work/Config.mk 2006-06-29 10:11:45.000000000 +0900 @@ -57,7 +57,17 @@ LDFLAGS += $(foreach i, $(EXTRA_LIB), -L CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i)) # Choose the best mirror to download linux kernel -KERNEL_REPO = http://www.kernel.org +DOWNLOAD_PATH_DEFAULT := .:.. +LINUX_REPO_DEFAULT := http://www.kernel.org/pub/linux/kernel/ +ifdef LINUX_SRC_PATH +DOWNLOAD_PATH ?= $(LINUX_SRC_PATH) # Compatibility +else +DOWNLOAD_PATH ?= $(DOWNLOAD_PATH_DEFAULT) +endif +DOWNLOAD_DIR := $(firstword $(subst :, ,$(DOWNLOAD_PATH))) +LINUX_REPO ?= $(LINUX_REPO_DEFAULT) +# LINUX_REPO_KERNEL_PATH Set in buildconfigs/Rules.mk, if not in environment +# LINUX_REPO_PATCH_PATH Set in buildconfigs/Rules.mk, if not in environment # If ACM_SECURITY = y, then the access control module is compiled # into Xen and the policy type can be set by the boot policy file --- from-0002/Makefile +++ to-work/Makefile 2006-06-29 10:11:45.000000000 +0900 @@ -175,6 +175,20 @@ help: @echo '' install into prefix/lib/python<VERSION>'' @echo '' instead of <PREFIX>/lib/python'' @echo '' true if set to non-empty value, false otherwise'' + @echo '' LINUX_REPO=URL - Base URL to download linux kernel from'' + @echo '' Default: "$(LINUX_REPO_DEFAULT)"'' + @echo '' LINUX_REPO_KERNEL_PATH=DIRECTORY'' + @echo '' - LINUX_REPO assumes that the URL has the same directory'' + @echo '' structure as $(LINUX_REPO_DEFAULT)'' + @echo '' and the rest of the path to the tarball is derived.'' + @echo '' If set, override the derivation.'' + @echo '' Default: ""'' + @echo '' LINUX_REPO_PATCHL_PATH=DIRECTORY'' + @echo '' - LINUX_REPO assumes that the URL has the same directory'' + @echo '' structure as $(LINUX_REPO_DEFAULT)'' + @echo '' and the rest of the path to the patches is derived.'' + @echo '' If set, override the derivation.'' + @echo '' Default: ""'' # Use this target with extreme care! .PHONY: uninstall --- from-0002/buildconfigs/Rules.mk +++ to-work/buildconfigs/Rules.mk 2006-06-29 10:11:45.000000000 +0900 @@ -22,32 +22,58 @@ 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) +vpath linux-%.tar.bz2 $(DOWNLOAD_PATH) +vpath patch-%.bz2 $(DOWNLOAD_PATH) # download a pristine Linux kernel tarball if there isn''t one in LINUX_SRC_PATH +ifndef LINUX_REPO_KERNEL_PATH linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*)) +linux-%.tar.bz2: LINUX_REPO_KERNEL_PATH = v$(_LINUX_VDIR) +endif linux-%.tar.bz2: @echo "Cannot find $@ in path $(LINUX_SRC_PATH)" - wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@ + wget $(LINUX_REPO)/$(LINUX_REPO_KERNEL_PATH)/$@ -O$(DOWNLOAD_DIR)/$@ \ + || { rm -f $(DOWNLOAD_DIR)/$@; false; } +ifndef LINUX_REPO_PATCH_PATH 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: LINUX_REPO_PATCH_PATH = v$(_LINUX_VDIR)/$(_LINUX_XDIR) +endif patch-%.bz2: @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)" - wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@ + wget $(LINUX_REPO)/$(LINUX_REPO_PATCH_PATH)/$(@F) \ + -O$(DOWNLOAD_DIR)/$@ || { rm -f $(DOWNLOAD_DIR)/$@; false; } pristine-%: pristine-%/.valid-pristine @true + +# unpack-pristine and patch-pristine targets are run in a submake +# so that vpath is re-evaluated. This is important for the case +# where the files are dowloaded this time around, and they are downloaded +# into an alternate directory, as specified by DOWNLOAD_PATH + +unpack-pristine-%-X: % + tar -C $(UNPACK_DIR) -jxf $< + +patch-pristine-%-X: % + echo $< + bzcat $< | patch -d $(UNPACK_DIR) -p1 + +.PHONY: patch-pristine-dummy +patch-pristine-dummy-X: -pristine-%/.valid-pristine: %.tar.bz2 +pristine-%/.valid-pristine: $(LINUX_TARBALL) $(LINUX_PATCHES) rm -rf tmp-pristine-$* $(@D) mkdir -p tmp-pristine-$* - tar -C tmp-pristine-$* -jxf $< - -@rm -f tmp-pristine-$*/pax_global_header + @# firstword is used to get rid of any whitespace + $(MAKE) UNPACK_DIR=tmp-pristine-$* \ + unpack-pristine-$(firstword $(LINUX_TARBALL))-X + -rm -f tmp-pristine-$*/pax_global_header mv tmp-pristine-$*/* $(@D) - @rm -rf tmp-pristine-$* + rm -rf tmp-pristine-$* + $(MAKE) KERNELS=linux-2.6-xen UNPACK_DIR=pristine-$* \ + $(patsubst %, patch-pristine-%-X, dummy $(LINUX_PATCHES)) touch $(@D)/.hgskip touch $@ # update timestamp to avoid rebuild --- from-0003/buildconfigs/mk.linux-2.6-xen +++ to-work/buildconfigs/mk.linux-2.6-xen 2006-06-29 10:14:41.000000000 +0900 @@ -1,5 +1,7 @@ LINUX_SERIES = 2.6 LINUX_VER = 2.6.16.13 +LINUX_TARBALL = linux-2.6.16.13.tar.bz2 # Only one makes sense +#LINUX_PATCHES = patch-2.6.17-rcN.bz2 # Usually zero or one patch EXTRAVERSION ?= xen @@ -57,4 +59,4 @@ delete: .PHONY: mrpropper mrpropper: - rm -f linux-$(LINUX_VER).tar.bz2 + rm -f $(LINUX_TARBALL) $(LINUX_PATCHES) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Horms
2006-Jun-29 09:18 UTC
[Xen-devel] Re: [PATCH 1/2] build: clean up kclean and distclean for kernel
The version of this patch that I sent earlier today was bogus as it was actually a duplicate of the 2nd patch I sent in this patch ([PATCH 2/2] build: make linux download more flexible). This is what it should have looked like. The second patch itself should be fine as sent earlier today. -- Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/ build: clean up kclean and distclean for kernel * Don''t delete non-existent %.tar.bz2 in buildconfigs/Rules.mk''s %-mrproper * Add a mrpropper target to buildconfigs/mk.linux-2.6-xen, and have this delete the local tarball - This should also delete the local patch, if there is one, but I am not sure how to do this with the current incarntation of the code, and I will post a subsequent patch which makes this easier and effects this chang. As there currently is no local patch this is not a big deal at this moment. (Horms) * Make distclean depend on kdekete, rather than calling delete target by hand * Stop kclean from erroring out if the kernel directory doesn''t exist * Remove patches/*/.makedep in top level Makefile rather than in buildconfigs/Rules.mk, as calling rules in the latter causes patches/*/.make to be created (Magnus) Signed-Off-By: Magnus Damm <magnus@valinux.co.jp> Signed-Off-By: Horms <horms@verge.net.au> --- from-0001/Makefile +++ to-work/Makefile 2006-06-28 10:54:02.000000000 +0900 @@ -123,13 +123,13 @@ clean:: # clean, but blow away kernel build tree plus tarballs .PHONY: distclean -distclean: +distclean: kdelete $(MAKE) -C xen distclean $(MAKE) -C tools distclean $(MAKE) -C docs distclean rm -rf dist patches/tmp - for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done + rm -rf patches/*/.makedep # Linux name for GNU distclean .PHONY: mrproper --- from-0001/buildconfigs/Rules.mk +++ to-work/buildconfigs/Rules.mk 2006-06-28 10:47:15.000000000 +0900 @@ -59,10 +59,6 @@ ifneq ($(PATCHDIRS),) $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep: @echo ''ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)'' >$@ -.PHONY: clean -clean:: - rm -f patches/*/.makedep - ref-%/.valid-ref: pristine-%/.valid-pristine set -e rm -rf $(@D) @@ -111,7 +107,8 @@ linux-2.6-xen.patch: ref-linux-$(LINUX_V rm -rf tmp-$@ %-mrproper: - rm -rf pristine-$(*)* ref-$(*)* $*.tar.bz2 + $(MAKE) -f buildconfigs/mk.$*-xen mrpropper + rm -rf pristine-$(*)* ref-$(*)* rm -rf $*-xen.patch .PHONY: config-update-pae --- from-0001/buildconfigs/mk.linux-2.6-xen +++ to-work/buildconfigs/mk.linux-2.6-xen 2006-06-28 10:47:15.000000000 +0900 @@ -47,8 +47,14 @@ config: $(LINUX_DIR)/include/linux/autoc .PHONY: clean clean:: - $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean + [ ! -d $(LINUX_DIR) ] || \ + $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean + .PHONY: delete delete: rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR) + +.PHONY: mrpropper +mrpropper: + rm -f linux-$(LINUX_VER).tar.bz2 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Jun-29 13:32 UTC
[Xen-devel] Re: [PATCH 1/2] build: clean up kclean and distclean for kernel
On 29 Jun 2006, at 10:18, Horms wrote:> The version of this patch that I sent earlier today was bogus as > it was actually a duplicate of the 2nd patch I sent in this patch > ([PATCH 2/2] build: make linux download more flexible). > This is what it should have looked like. > > The second patch itself should be fine as sent earlier today.These patches seem to churn the build system a bit but I''m not clear how much they improve things. What do they improve? Anyone else interested in seeing them committed? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Horms
2006-Jun-30 02:42 UTC
[Xen-devel] Re: [PATCH 1/2] build: clean up kclean and distclean for kernel
On Thu, Jun 29, 2006 at 02:32:18PM +0100, Keir Fraser wrote:> > On 29 Jun 2006, at 10:18, Horms wrote: > > >The version of this patch that I sent earlier today was bogus as > >it was actually a duplicate of the 2nd patch I sent in this patch > >([PATCH 2/2] build: make linux download more flexible). > >This is what it should have looked like. > > > >The second patch itself should be fine as sent earlier today. > > These patches seem to churn the build system a bit but I''m not clear > how much they improve things. What do they improve? Anyone else > interested in seeing them committed?I feel that what they improve is farily clearly listed in the inline comments. I''m happy to trim them down if some bits are unwanted. But I do believe they significantly improve the semantics of both downloads and distclean. I have tested them quite extensively over serveral months now (though oviously not the minor updates I made yesterday relating to $LINUX_VER vs $LINUX_SRC, and I can confirm that at least in my environment they work well. -- Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Jun-30 09:39 UTC
[Xen-devel] Re: [PATCH 1/2] build: clean up kclean and distclean for kernel
On 29 Jun 2006, at 10:18, Horms wrote:> * Make distclean depend on kdekete, rather than calling delete target > by > handThis changes semantics of distclean to clean only KERNELS rather than ALLKERNELS. It makes sense for distclean to do the latter. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Horms
2006-Jun-30 10:12 UTC
[Xen-devel] Re: [PATCH 1/2] build: clean up kclean and distclean for kernel
On Fri, Jun 30, 2006 at 10:39:43AM +0100, Keir Fraser wrote:> > On 29 Jun 2006, at 10:18, Horms wrote: > > >* Make distclean depend on kdekete, rather than calling delete target > >by > > hand > > This changes semantics of distclean to clean only KERNELS rather than > ALLKERNELS. It makes sense for distclean to do the latter.Sorry about that. I''ll take a look into that and get a fresh patch out. -- Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Horms
2006-Jul-03 03:37 UTC
[Xen-devel] Re: [PATCH 1/2] build: clean up kclean and distclean for kernel
On Fri, Jun 30, 2006 at 07:12:26PM +0900, Horms wrote:> On Fri, Jun 30, 2006 at 10:39:43AM +0100, Keir Fraser wrote: > > > > On 29 Jun 2006, at 10:18, Horms wrote: > > > > >* Make distclean depend on kdekete, rather than calling delete target > > >by > > > hand > > > > This changes semantics of distclean to clean only KERNELS rather than > > ALLKERNELS. It makes sense for distclean to do the latter. > > Sorry about that. I''ll take a look into that and get a fresh patch out.I have removed the offending portion, and the patch now leave she cleaning ALLKERNELS in a for loop intact. New patch below. -- Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/ * Don''t delete non-existent %.tar.bz2 in buildconfigs/Rules.mk''s %-mrproper * Add a mrpropper target to buildconfigs/mk.linux-2.6-xen, and have this delete the local tarball - This should also delete the local patch, if there is one, but I am not sure how to do this with the current incarntation of the code, and I will post a subsequent patch which makes this easier and effects this chang. As there currently is no local patch this is not a big deal at this moment. (Horms) * Stop kclean from erroring out if the kernel directory doesn''t exist * Remove patches/*/.makedep in top level Makefile rather than in buildconfigs/Rules.mk, as calling rules in the latter causes patches/*/.make to be created (Magnus) Signed-Off-By: Magnus Damm <magnus@valinux.co.jp> Signed-Off-By: Horms <horms@verge.net.au> Makefile | 1 + buildconfigs/Rules.mk | 7 ++----- buildconfigs/mk.linux-2.6-xen | 8 +++++++- 3 files changed, 10 insertions(+), 6 deletions(-) --- from-0001/Makefile +++ to-work/Makefile 2006-07-03 12:18:44.000000000 +0900 @@ -130,6 +130,7 @@ distclean: rm -rf dist patches/tmp for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done + rm -rf patches/*/.makedep # Linux name for GNU distclean .PHONY: mrproper --- from-0001/buildconfigs/Rules.mk +++ to-work/buildconfigs/Rules.mk 2006-07-03 11:48:26.000000000 +0900 @@ -59,10 +59,6 @@ ifneq ($(PATCHDIRS),) $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep: @echo ''ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)'' >$@ -.PHONY: clean -clean:: - rm -f patches/*/.makedep - ref-%/.valid-ref: pristine-%/.valid-pristine set -e rm -rf $(@D) @@ -111,7 +107,8 @@ linux-2.6-xen.patch: ref-linux-$(LINUX_V rm -rf tmp-$@ %-mrproper: - rm -rf pristine-$(*)* ref-$(*)* $*.tar.bz2 + $(MAKE) -f buildconfigs/mk.$*-xen mrpropper + rm -rf pristine-$(*)* ref-$(*)* rm -rf $*-xen.patch .PHONY: config-update-pae --- from-0001/buildconfigs/mk.linux-2.6-xen +++ to-work/buildconfigs/mk.linux-2.6-xen 2006-07-03 11:48:26.000000000 +0900 @@ -47,8 +47,14 @@ config: $(LINUX_DIR)/include/linux/autoc .PHONY: clean clean:: - $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean + [ ! -d $(LINUX_DIR) ] || \ + $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean + .PHONY: delete delete: rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR) + +.PHONY: mrpropper +mrpropper: + rm -f linux-$(LINUX_VER).tar.bz2 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel