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 ...@@ -149,14 +149,13 @@ space := $(nullstring) # end of line
# careful not to include files twice if building in the source # careful not to include files twice if building in the source
# directory. LOCALVERSION from the command line override all of this # directory. LOCALVERSION from the command line override all of this
ifeq ($(objtree),$(srctree)) localver := $(objtree)/localversion* $(srctree)/localversion*
localversion-files := $(wildcard $(srctree)/localversion*) localver := $(sort $(wildcard $(localver)))
else # skip backup files (containing '~')
localversion-files := $(wildcard $(objtree)/localversion* $(srctree)/localversion*) localver := $(foreach f, $(localver), $(if $(findstring ~, $(f)),,$(f)))
endif
LOCALVERSION = $(subst $(space),, \ LOCALVERSION = $(subst $(space),, \
$(shell cat /dev/null $(localversion-files:%~=)) \ $(shell cat /dev/null $(localver)) \
$(patsubst "%",%,$(CONFIG_LOCALVERSION))) $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(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