Merge 746b25b1aa
("Merge tag 'kbuild-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild") into android-mainline
Steps on the way to 5.10-rc1 Resolves conflicts in: arch/arm64/kernel/vdso32/Makefile Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ic9edce8127b3717469dc4fa96ca95166be419e9d
This commit is contained in:
@@ -65,7 +65,7 @@ scm_version()
|
||||
|
||||
# Check for git and a git repo.
|
||||
if test -z "$(git rev-parse --show-cdup 2>/dev/null)" &&
|
||||
head=$(git rev-parse --verify --short HEAD 2>/dev/null); then
|
||||
head=$(git rev-parse --verify HEAD 2>/dev/null); then
|
||||
|
||||
if [ -n "$android_release" ] && [ -n "$kmi_generation" ]; then
|
||||
printf '%s' "-$android_release-$kmi_generation"
|
||||
@@ -83,11 +83,22 @@ scm_version()
|
||||
fi
|
||||
# If we are past a tagged commit (like
|
||||
# "v2.6.30-rc5-302-g72357d5"), we pretty print it.
|
||||
if atag="$(git describe 2>/dev/null)"; then
|
||||
echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
|
||||
#
|
||||
# Ensure the abbreviated sha1 has exactly 12
|
||||
# hex characters, to make the output
|
||||
# independent of git version, local
|
||||
# core.abbrev settings and/or total number of
|
||||
# objects in the current repository - passing
|
||||
# --abbrev=12 ensures a minimum of 12, and the
|
||||
# awk substr() then picks the 'g' and first 12
|
||||
# hex chars.
|
||||
if atag="$(git describe --abbrev=12 2>/dev/null)"; then
|
||||
echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),substr($(NF),0,13))}'
|
||||
|
||||
# If we don't have a tag at all we print -g{commitish}.
|
||||
# If we don't have a tag at all we print -g{commitish},
|
||||
# again using exactly 12 hex chars.
|
||||
else
|
||||
head="$(echo $head | cut -c1-12)"
|
||||
printf '%s%s' -g $head
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user