From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
Masahiro Yamada <masahiroy@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Nicolas Schier <nicolas@fjasle.eu>
Subject: [PATCH 7/7] kbuild: do not re-run setlocalversion for kernelrelease
Date: Sun, 22 Jan 2023 23:14:27 +0900 [thread overview]
Message-ID: <20230122141428.115372-7-masahiroy@kernel.org> (raw)
In-Reply-To: <20230122141428.115372-1-masahiroy@kernel.org>
Revert:
- 7b8ea53d7f18 ("makefile: not need to regenerate kernel.release
file when make kernelrelease")
- 01ab17887f4c ("Makefile: "make kernelrelease" should show the
correct full kernel version")
I think the original behavior was better - 'make kernelrelease' should
print $(KERNELRELEASE) used in the last build, not the one that will
be used in the next build. Therefore, it is an error if you run it in
the pristine source tree.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index d0a95277f08a..de402d415d5f 100644
--- a/Makefile
+++ b/Makefile
@@ -281,13 +281,13 @@ clean-targets := %clean mrproper cleandocs
no-dot-config-targets := $(clean-targets) \
cscope gtags TAGS tags help% %docs check% coccicheck \
$(version_h) headers headers_% archheaders archscripts \
- %asm-generic kernelversion %src-pkg dt_binding_check \
+ %asm-generic kernelrelease kernelversion %src-pkg dt_binding_check \
outputmakefile rustavailable rustfmt rustfmtcheck
# Installation targets should not require compiler. Unfortunately, vdso_install
# is an exception where build artifacts may be updated. This must be fixed.
no-compiler-targets := $(no-dot-config-targets) install dtbs_install \
- headers_install modules_install kernelrelease image_name
-no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease \
+ headers_install modules_install image_name
+no-sync-config-targets := $(no-dot-config-targets) %install \
image_name
single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.rsi %.s %.symtypes %/
@@ -1677,7 +1677,7 @@ help:
@echo ' tags/TAGS - Generate tags file for editors'
@echo ' cscope - Generate cscope index'
@echo ' gtags - Generate GNU GLOBAL index'
- @echo ' kernelrelease - Output the release version string (use with make -s)'
+ @echo ' kernelrelease - Output the release version string used in the last build (use with make -s)'
@echo ' kernelversion - Output the version stored in Makefile (use with make -s)'
@echo ' image_name - Output the image name (use with make -s)'
@echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
@@ -2111,7 +2111,7 @@ checkstack:
$(PERL) $(srctree)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
kernelrelease:
- @$(srctree)/scripts/setlocalversion $(srctree)
+ @echo $(or $(KERNELRELEASE),$(error kernelrelease not valid - run 'make prepare' to update it))
kernelversion:
@echo $(KERNELVERSION)
--
2.34.1
next prev parent reply other threads:[~2023-01-22 14:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-22 14:14 [PATCH 1/7] kbuild: do not put .scmversion into the source tarball Masahiro Yamada
2023-01-22 14:14 ` [PATCH 2/7] setlocalversion: simplify the construction of the short version Masahiro Yamada
2023-01-29 21:30 ` Nicolas Schier
2023-01-22 14:14 ` [PATCH 3/7] setlocalversion: make indentation shallower Masahiro Yamada
2023-01-29 21:31 ` Nicolas Schier
2023-01-22 14:14 ` [PATCH 4/7] setlocalversion: use only the correct release tag for git-describe Masahiro Yamada
2023-02-05 12:02 ` Masahiro Yamada
2023-01-22 14:14 ` [PATCH 5/7] setlocalversion: absorb $(KERNELVERSION) Masahiro Yamada
2023-01-22 14:14 ` [PATCH 6/7] setlocalversion: print ${KERNELRELEASE} if set Masahiro Yamada
2023-01-27 16:19 ` Masahiro Yamada
2023-01-22 14:14 ` Masahiro Yamada [this message]
2023-02-01 13:09 ` [PATCH 7/7] kbuild: do not re-run setlocalversion for kernelrelease Masahiro Yamada
2023-01-27 15:07 ` [PATCH 1/7] kbuild: do not put .scmversion into the source tarball Thierry Reding
2023-01-27 15:50 ` Masahiro Yamada
2023-01-27 19:29 ` Nathan Chancellor
2023-01-28 1:11 ` Masahiro Yamada
2023-01-29 21:29 ` Nicolas Schier
2023-01-30 1:44 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230122141428.115372-7-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nicolas@fjasle.eu \
--cc=rasmus.villemoes@prevas.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox