From: Horms Subject: [PATCH 7/11] build: clean up kclean and distclean for kernel Date: Mon, 10 Apr 2006 11:29:49 +0900 Message-ID: <20060410022949.15477.94914.sendpatchset@tabatha.lab.ultramonkey.org> References: <20060410022914.15477.13677.sendpatchset@tabatha.lab.ultramonkey.org> Return-path: In-Reply-To: <20060410022914.15477.13677.sendpatchset@tabatha.lab.ultramonkey.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Magnus Damm , Horms List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Horms # Node ID d9046742b4a9365bc4b8c010a4f9944c3976219f # Parent a1cc586bceb80bee9a01ee4bf10bca6cb65c53e8 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 kclean, 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 Signed-Off-By: Horms --- from-0009/Makefile +++ to-work/Makefile 2006-03-30 16:53:12.000000000 +0900 @@ -121,12 +121,12 @@ clean:: $(MAKE) -C tools clean $(MAKE) -C docs clean -# clean, but blow away kernel build tree plus tarballs +# clean, but blow away kernel build tree plus local tarballs .PHONY: distclean -distclean: clean +distclean: clean kdelete 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-0007/buildconfigs/Rules.mk +++ to-work/buildconfigs/Rules.mk 2006-03-30 16:53:12.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-0007/buildconfigs/mk.linux-2.6-xen +++ to-work/buildconfigs/mk.linux-2.6-xen 2006-03-30 16:54:32.000000000 +0900 @@ -48,8 +48,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) -- Horms