Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932749AbXAaJ1M (ORCPT ); Wed, 31 Jan 2007 04:27:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932788AbXAaJ1L (ORCPT ); Wed, 31 Jan 2007 04:27:11 -0500 Received: from raven.upol.cz ([158.194.120.4]:40666 "EHLO raven.upol.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932749AbXAaJ1K (ORCPT ); Wed, 31 Jan 2007 04:27:10 -0500 Date: Wed, 31 Jan 2007 09:35:42 +0000 To: LKML Cc: Roman Zippel , Bastian Blank , Sam Ravnborg , Andrew Morton Subject: [patch] update for (kbuild: correctly skip tilded backups in localversion files) Message-ID: <20070131093542.GA3471@flower.upol.cz> References: <20070131071103.GA3295@flower.upol.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070131071103.GA3295@flower.upol.cz> Organization: Palacky University in Olomouc, experimental physics department. User-Agent: Mutt/1.5.13 (2006-08-11) From: Oleg Verych Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1426 Lines: 35 kbuild: finally correctly skip tilded backups in localversion files Signed-off-by: Oleg Verych --- Final addition. Why i want to maximize usage of shell, rather, than `make'? Just because i think, it's more portable, clear way. Thanks. --- linux-2.6.20-rc6/Makefile~4tilde-backups~ 2007-01-31 07:46:18.696404500 +0100 +++ linux-2.6.20-rc6/Makefile 2007-01-31 10:19:18.406100500 +0100 @@ -788,10 +788,10 @@ $(vmlinux-dirs): prepare scripts # scripts/setlocalversion and add the appropriate checks as needed. -localversion = $(objtree)/localversion $(srctree)/localversion -ext_versions = $(objtree)/localversion[^~]* $(srctree)/localversion[!~]* -versions = $(localversion) $(ext_versions) -localver = $(subst $(space),, \ - $(shell cat /dev/null $(sort $(wildcard $(versions)))) \ - $(patsubst "%",%,$(CONFIG_LOCALVERSION))) +pattern = ".*/localversion[^~]*" +string = $(shell cat /dev/null \ + `find $(objtree) $(srctree) -maxdepth 1 -regex $(pattern) | sort`) + +localver = $(subst $(space),, $(string) \ + $(patsubst "%",%,$(CONFIG_LOCALVERSION))) # If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/