diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-09-22 01:31:13 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-10-09 10:28:46 -0400 |
commit | 278ae6040397f37fa6a96a6b86ed02d4762080a7 (patch) | |
tree | f8796d31b30bf077b0868a49bc8a0dabf401bde0 /scripts/link-vmlinux.sh | |
parent | f231e43333124d92a82acd19431f8104b8e48a75 (diff) |
kbuild: link-vmlinux.sh: simplify .version increment
Since commit 1f2bfbd00e46 ("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 4e25d8bb9550fb ("[PATCH] kbuild: adjust .version
updating"). Just remove it.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/link-vmlinux.sh')
-rwxr-xr-x | scripts/link-vmlinux.sh | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index e7b7eee31538..0cdb25b66e6f 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh | |||
@@ -187,10 +187,8 @@ sortextable() | |||
187 | # Delete output files in case of error | 187 | # Delete output files in case of error |
188 | cleanup() | 188 | cleanup() |
189 | { | 189 | { |
190 | rm -f .old_version | ||
191 | rm -f .tmp_System.map | 190 | rm -f .tmp_System.map |
192 | rm -f .tmp_kallsyms* | 191 | rm -f .tmp_kallsyms* |
193 | rm -f .tmp_version | ||
194 | rm -f .tmp_vmlinux* | 192 | rm -f .tmp_vmlinux* |
195 | rm -f built-in.o | 193 | rm -f built-in.o |
196 | rm -f System.map | 194 | rm -f System.map |
@@ -238,12 +236,12 @@ esac | |||
238 | 236 | ||
239 | # Update version | 237 | # Update version |
240 | info GEN .version | 238 | info GEN .version |
241 | if [ ! -r .version ]; then | 239 | if [ -r .version ]; then |
242 | rm -f .version; | 240 | VERSION=$(expr 0$(cat .version) + 1) |
243 | echo 1 >.version; | 241 | echo $VERSION > .version |
244 | else | 242 | else |
245 | mv .version .old_version; | 243 | rm -f .version |
246 | expr 0$(cat .old_version) + 1 >.version; | 244 | echo 1 > .version |
247 | fi; | 245 | fi; |
248 | 246 | ||
249 | # final build of init/ | 247 | # final build of init/ |
@@ -331,6 +329,3 @@ if [ -n "${CONFIG_KALLSYMS}" ]; then | |||
331 | exit 1 | 329 | exit 1 |
332 | fi | 330 | fi |
333 | fi | 331 | fi |
334 | |||
335 | # We made a new kernel - delete old version file | ||
336 | rm -f .old_version | ||