Commit 5249fb74 authored by Sam Ravnborg's avatar Sam Ravnborg

kbuild: skip localversion files with '~' anywhere in their name

Idea from:  Blaisorblade <blaisorblade_spam@yahoo.it>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 2249c21b
......@@ -149,14 +149,13 @@ space := $(nullstring) # end of line
# careful not to include files twice if building in the source
# directory. LOCALVERSION from the command line override all of this
ifeq ($(objtree),$(srctree))
localversion-files := $(wildcard $(srctree)/localversion*)
else
localversion-files := $(wildcard $(objtree)/localversion* $(srctree)/localversion*)
endif
localver := $(objtree)/localversion* $(srctree)/localversion*
localver := $(sort $(wildcard $(localver)))
# skip backup files (containing '~')
localver := $(foreach f, $(localver), $(if $(findstring ~, $(f)),,$(f)))
LOCALVERSION = $(subst $(space),, \
$(shell cat /dev/null $(localversion-files:%~=)) \
$(shell cat /dev/null $(localver)) \
$(patsubst "%",%,$(CONFIG_LOCALVERSION)))
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment