From a3db5ef162998cfdfce433fac0b8866a5700690d Mon Sep 17 00:00:00 2001 From: Oleg Verych Date: Tue, 6 Feb 2007 02:18:22 +0100 Subject: [PATCH] --- yaml --- r: 46101 b: refs/heads/master c: 76c329563c5b8663ef27eb1bd195885ab826cbd0 h: refs/heads/master i: 46099: 820e134f823431953842bf1feda2470221c8171a v: v3 --- [refs] | 2 +- trunk/Makefile | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 6803729e879e..434c24d0a9a1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5de043f4bd11a9e0a3e8daec7d1905da575a76b7 +refs/heads/master: 76c329563c5b8663ef27eb1bd195885ab826cbd0 diff --git a/trunk/Makefile b/trunk/Makefile index 7e2750f4ca70..cdeda68cf2aa 100644 --- a/trunk/Makefile +++ b/trunk/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 set) # ./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.