Commit:     76c329563c5b8663ef27eb1bd195885ab826cbd0
Parent:     5de043f4bd11a9e0a3e8daec7d1905da575a76b7
Author:     Oleg Verych <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 6 02:18:22 2007 +0100
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 6 14:30:49 2007 -0800

    [PATCH] kbuild: correctly skip tilded backups in localversion files
     Tildes as in path as in filenames are handled correctly now:
     only files, containing tilde '~', are backups, thus are not valid.
     Definition of `space' was removed, scripts/Kbuild.include has one.
     That definition was taken right from the GNU make manual, while Kbuild's
     version is original.
    Cc: Roman Zippel <[EMAIL PROTECTED]>
    Cc: Bastian Blank <[EMAIL PROTECTED]>
    Cc: Sam Ravnborg <[EMAIL PROTECTED]>
    Signed-off-by: Oleg Verych <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 Makefile |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index 7e2750f..cdeda68 100644
--- a/Makefile
+++ b/Makefile
@@ -776,7 +776,7 @@ $(vmlinux-dirs): prepare scripts
 #        $(EXTRAVERSION)               eg, -rc6
 #      $(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 
 #          ./scripts/setlocalversion   (SCM tag, if one exists)
@@ -787,17 +787,12 @@ $(vmlinux-dirs): prepare scripts
 # moment, only git is supported but other SCMs can edit the script
 # scripts/setlocalversion and add the appropriate checks as needed.
-nullstring :=
-space      := $(nullstring) # end of line
+pattern = ".*/localversion[^~]*"
+string  = $(shell cat /dev/null \
+          `find $(objtree) $(srctree) -maxdepth 1 -regex $(pattern) | sort`)
-___localver = $(objtree)/localversion* $(srctree)/localversion*
-__localver  = $(sort $(wildcard $(___localver)))
-# skip backup files (containing '~')
-_localver = $(foreach f, $(__localver), $(if $(findstring ~, $(f)),,$(f)))
-localver = $(subst $(space),, \
-          $(shell cat /dev/null $(_localver)) \
-          $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
+localver = $(subst $(space),, $(string) \
+                             $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
 # If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called
 # and if the SCM is know a tag from the SCM is appended.
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to