From: Horms Subject: Re: [PATCH 1/2] build: clean up kclean and distclean for kernel Date: Mon, 3 Jul 2006 12:37:20 +0900 Message-ID: <20060703033719.GA31739@verge.net.au> References: <20060628020414.GB28692@verge.net.au> <20060629000044.GW30330@verge.net.au> <20060629012424.GA14402@verge.net.au> <20060629012619.GB14402@verge.net.au> <20060629091850.GA3595@verge.net.au> <7c1ea0f0bf386acd76dd2bc75d40155d@cl.cam.ac.uk> <20060630101225.GA7506@verge.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20060630101225.GA7506@verge.net.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel List-Id: xen-devel@lists.xenproject.org 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 Signed-Off-By: Horms 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