X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=Makefile;h=cdeda68cf2aa9082571366837a504fe80ef6c40e;hb=fe334602a83463aff59ae24c4b3e808d650a3c80;hp=7e2750f4ca707a8f009987810d6756a869128f6a;hpb=62d0cfcb27cf755cebdc93ca95dabc83608007cd;p=powerpc.git diff --git a/Makefile b/Makefile index 7e2750f4ca..cdeda68cf2 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 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.