From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 10 Oct 2002 15:29:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 10 Oct 2002 15:29:30 -0400 Received: from pasmtp.tele.dk ([193.162.159.95]:52233 "EHLO pasmtp.tele.dk") by vger.kernel.org with ESMTP id ; Thu, 10 Oct 2002 15:29:27 -0400 Date: Thu, 10 Oct 2002 21:34:40 +0200 From: Sam Ravnborg To: Linus Torvalds , linux-kernel@vger.kernel.org Cc: Kai Germaschewski Subject: [PATCH] Distributed clean Message-ID: <20021010213440.A508@mars.ravnborg.org> Mail-Followup-To: Linus Torvalds , linux-kernel@vger.kernel.org, Kai Germaschewski Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Here is a set of patches to implement distributed clean. A cleanup of Documentation/DocBook is included as well. See diffstat and changeset descriptions below. Can be pulled from http://linux-sam.bkbits.net/kbuild2 Regular patches will follow this one. The whole purpose with this is to move out the centralised list of files that today is present in the top-level makefile to the individual makefile where they originally are created. During a make clean, all makefile are traversed recursively, and for each makfile all files listed with clean-files := file file are deleted. Furthermore all *.oas, .*.tmp .*.d files are deleted in all directories looked into. The list of directories are build upon the normal obj-$(CONFIG_XX) rules, with the addition of empty "obj-" and negative "obj-n" directories are searched as well. The first patch implements the infrastructure only, and therefore Rules.make is touched. The subsequent patches introduce the usage in the kernel tree, and the net result is that CLEAN_FILES is down to one line, and MRPROPER_FILES is several lines shorter. The only new behaviour introduced are that firmware files are now deleted during make clean, as any other generated files. Based on a concept originally by Kai Germaschewski. Please apply, Sam Documentation/DocBook/Makefile | 52 ++++++++++++------------------- Makefile | 40 +---------------------- drivers/atm/Makefile | 6 ++- drivers/char/Makefile | 3 + drivers/net/hamradio/soundmodem/Makefile | 6 +++ drivers/pci/Makefile | 3 + drivers/scsi/Makefile | 6 ++- drivers/scsi/aic7xxx/Makefile | 14 ++++++-- drivers/scsi/aic7xxx/aicasm/Makefile | 2 - drivers/video/Makefile | 3 + drivers/zorro/Makefile | 3 + init/Makefile | 10 ++++- sound/oss/Makefile | 4 ++ 13 files changed, 74 insertions(+), 78 deletions(-) ChangeSet@1.748.1.1, 2002-10-10 20:24:45+02:00, sam@mars.ravnborg.org kbuild: Distributed clean infrastructure Today there is a huge list of files in the top-level Makefile that is deleted during make clean and make mrproper. This patch add infrastructure to get rid of this centralised list. Within a makefile simply use: clean-files := files-to-be-deleted or eventually clean-rule := command to be executed to delete files Files specified by host-progs and EXTRA_TARGETS are deleted during cleaning, and the same is all *.[oas] .*.cmd .*.tmp .*.d in the visited directories. Deleting core files is moved down to mrporper time Patches utilising this and the centralised list will dismiss. Based on a concept originally made by Kai Germaschewski ChangeSet@1.748.1.2, 2002-10-10 20:44:28+02:00, sam@mars.ravnborg.org scsi+aic7xxx: Utilise distributed clean List files to be deleted during make clean where they are created ChangeSet@1.748.1.3, 2002-10-10 20:50:19+02:00, sam@mars.ravnborg.org drivers/{atm,char,pci,video,zorro}: ditributed clean Move list of files to be deleted during make clean out where they are made. host-progs files taken care of automagically ChangeSet@1.748.1.4, 2002-10-10 20:52:41+02:00, sam@mars.ravnborg.org drivers/net/hamradio/soundmodem: distributed clean Move list of files out where it belongs ChangeSet@1.748.1.5, 2002-10-10 20:57:03+02:00, sam@mars.ravnborg.org kbuild: Distributed clean, misc. o Move sound/oss file list to sound/oss/Makefile o Remove files non-existing in the tree (khttp,net/802/submenu) o scripts/* are handled by scripts makefile o Do not delete .config*, be more explicit o Add MC* - files generated by Menuconfig in toplevel dir ChangeSet@1.748.1.6, 2002-10-10 21:04:21+02:00, sam@mars.ravnborg.org docbook: Makefile cleanup o Removed special rules for JBD, covered by the general mechanishm o Use $(obj)/ instead of Documentation/DocBook o Introduced usage of Distributed clean o No longer delete *~ files in top-level directory during clean