Set CONFIG_LOCALVERSION insetad of EXTRAVERSION in Makefile to carry
information about the platform variant.
Change-Id: If1650692162832ea86988e4adb610ce0148edde3
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
%{?asan:/usr/bin/gcc-unforce-options}
%{?ubsan:/usr/bin/gcc-unforce-options}
-# Make sure EXTRAVERSION says what we want it to say
-sed -i "s/^EXTRAVERSION.*/EXTRAVERSION = -%{variant}/" Makefile
-
# 0. extract uapi headers
make headers_check %{?_smp_mflags}
make headers_install %{?_smp_mflags}
# 1-1. Set config file
make %{config_name} %{?_smp_mflags}
+if ! grep -q "^CONFIG_LOCALVERSION=\"-%{variant}" .config; then
+ ./scripts/config --set-str CONFIG_LOCALVERSION "-%{variant}$(eval $(grep ^CONFIG_LOCALVERSION= .config); echo $CONFIG_LOCALVERSION)"
+fi
# 1-2. Build Image/Image.gz
make %{?_smp_mflags}