mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] kbuild: correctly skip tilded backups in localversion files
@ 2007-01-31  7:11 Oleg Verych
  2007-01-31  9:35 ` [patch] update for (kbuild: correctly skip tilded backups in localversion files) Oleg Verych
  2007-01-31 23:56 ` [patch] kbuild: correctly skip tilded backups in localversion files Andrew Morton
  0 siblings, 2 replies; 7+ messages in thread
From: Oleg Verych @ 2007-01-31  7:11 UTC (permalink / raw)
  To: LKML; +Cc: Roman Zippel, Bastian Blank, Sam Ravnborg, Andrew Morton

kbuild: correctly skip tilded backups in localversion files

 Tildes as in path as in filenames are handled correctly now.

 Definition of `space' was removed, scripts/Kbuild.include has one.
 This definition was taken right from GNU make manual, while Kbuild's
 version is original.

Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Bastian Blank <bastian@waldi.eu.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Oleg Verych <olecom@flower.upol.cz>
---
Another try.

Original report and fix by Bastian Blank:

 The following patch fixes the problem that localversion files where
 ignored if the tree lives in a path which contains a ~. It changes the
 test to apply to the filename only.
 
 Debian allows versions which contains ~ in it. The upstream part of the
 version is in the directory name of the build tree and we got weird
 results because the localversion files was just got ignored in this
 case.

 Makefile |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

--- linux-2.6.20-rc6/Makefile~4tilde-backups~	2007-01-30 23:33:45.781462750 +0100
+++ linux-2.6.20-rc6/Makefile	2007-01-31 07:46:18.696404500 +0100
@@ -777,5 +777,5 @@ $(vmlinux-dirs): prepare scripts
 #	$(localver-full)
 #	  $(localver)
-#	    localversion*		(all localversion* files)
+#	    localversion*		(files, without backups containing '~')
 #	    $(CONFIG_LOCALVERSION)	(from kernel config setting)
 #	  $(localver-auto)		(only if CONFIG_LOCALVERSION_AUTO is set)
@@ -788,14 +788,9 @@ $(vmlinux-dirs): prepare scripts
 # scripts/setlocalversion and add the appropriate checks as needed.
 
-nullstring :=
-space      := $(nullstring) # end of line
-
-___localver = $(objtree)/localversion* $(srctree)/localversion*
-__localver  = $(sort $(wildcard $(___localver)))
-# skip backup files (containing '~')
-_localver = $(foreach f, $(__localver), $(if $(findstring ~, $(f)),,$(f)))
-
+localversion = $(objtree)/localversion	    $(srctree)/localversion
+ext_versions = $(objtree)/localversion[^~]* $(srctree)/localversion[!~]*
+versions = $(localversion) $(ext_versions)
 localver = $(subst $(space),, \
-	   $(shell cat /dev/null $(_localver)) \
+	   $(shell cat /dev/null $(sort $(wildcard $(versions)))) \
 	   $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-04 13:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-31  7:11 [patch] kbuild: correctly skip tilded backups in localversion files Oleg Verych
2007-01-31  9:35 ` [patch] update for (kbuild: correctly skip tilded backups in localversion files) Oleg Verych
2007-01-31 23:56 ` [patch] kbuild: correctly skip tilded backups in localversion files Andrew Morton
2007-02-01  2:37   ` Oleg Verych
2007-02-01  2:43     ` Andrew Morton
2007-02-01 15:59       ` 2.6.20-rc7 (Re: [patch] kbuild: correctly skip tilded backups in localversion files) Oleg Verych
2007-02-04 14:01       ` [patch] kbuild: correctly skip tilded backups in localversion files Oleg Verych

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®