[PATCH] Kbuild: add bareboxversion target to Makefile

Frank Wunderlich linux at fw-web.de
Sun Feb 6 07:07:16 PST 2022


From: Frank Wunderlich <frank-w at public-files.de>

This allows getting version string with make bareboxversion
like for linux and uboot.

Signed-off-by: Frank Wunderlich <frank-w at public-files.de>
---
 Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 3125d628114b..4b4a92181034 100644
--- a/Makefile
+++ b/Makefile
@@ -247,7 +247,7 @@ version_h := include/generated/version.h
 clean-targets := %clean mrproper cleandocs
 no-dot-config-targets := $(clean-targets) \
 			 cscope gtags TAGS tags help% %docs \
-			 $(version_h) kernelversion outputmakefile
+			 $(version_h) bareboxversion outputmakefile
 no-sync-config-targets := $(no-dot-config-targets) install %install \
 			   kernelrelease
 
@@ -1277,6 +1277,9 @@ docs: FORCE
 	@$(SPHINXBUILD) -b html -d $(objtree)/doctrees $(srctree)/Documentation \
 		$(objtree)/Documentation/html
 
+bareboxversion:
+	@echo $(KERNELVERSION)
+
 # Single targets
 # ---------------------------------------------------------------------------
 # Single targets are compatible with:
-- 
2.25.1




More information about the barebox mailing list