提交 278ae604 编写于 作者: M Masahiro Yamada

kbuild: link-vmlinux.sh: simplify .version increment

Since commit 1f2bfbd0 ("kbuild: link of vmlinux moved to a
script"), it is easy to increment .version without using a temporary
file .old_version.

I do not see anybody who creates the .tmp_version.  Probably it is a
left-over of commit 4e25d8bb ("[PATCH] kbuild: adjust .version
updating").  Just remove it.
Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
上级 f231e433
...@@ -1278,7 +1278,7 @@ CLEAN_DIRS += $(MODVERDIR) ...@@ -1278,7 +1278,7 @@ CLEAN_DIRS += $(MODVERDIR)
# Directories & files removed with 'make mrproper' # Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config usr/include include/generated \ MRPROPER_DIRS += include/config usr/include include/generated \
arch/*/include/generated .tmp_objdiff arch/*/include/generated .tmp_objdiff
MRPROPER_FILES += .config .config.old .version .old_version \ MRPROPER_FILES += .config .config.old .version \
Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
signing_key.pem signing_key.priv signing_key.x509 \ signing_key.pem signing_key.priv signing_key.x509 \
x509.genkey extra_certificates signing_key.x509.keyid \ x509.genkey extra_certificates signing_key.x509.keyid \
......
...@@ -187,10 +187,8 @@ sortextable() ...@@ -187,10 +187,8 @@ sortextable()
# Delete output files in case of error # Delete output files in case of error
cleanup() cleanup()
{ {
rm -f .old_version
rm -f .tmp_System.map rm -f .tmp_System.map
rm -f .tmp_kallsyms* rm -f .tmp_kallsyms*
rm -f .tmp_version
rm -f .tmp_vmlinux* rm -f .tmp_vmlinux*
rm -f built-in.o rm -f built-in.o
rm -f System.map rm -f System.map
...@@ -238,12 +236,12 @@ esac ...@@ -238,12 +236,12 @@ esac
# Update version # Update version
info GEN .version info GEN .version
if [ ! -r .version ]; then if [ -r .version ]; then
rm -f .version; VERSION=$(expr 0$(cat .version) + 1)
echo 1 >.version; echo $VERSION > .version
else else
mv .version .old_version; rm -f .version
expr 0$(cat .old_version) + 1 >.version; echo 1 > .version
fi; fi;
# final build of init/ # final build of init/
...@@ -331,6 +329,3 @@ if [ -n "${CONFIG_KALLSYMS}" ]; then ...@@ -331,6 +329,3 @@ if [ -n "${CONFIG_KALLSYMS}" ]; then
exit 1 exit 1
fi fi
fi fi
# We made a new kernel - delete old version file
rm -f .old_version
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册