@@ -1517,6 +1517,10 @@ help:
@echo 'Kernel packaging:'
@$(MAKE) $(build)=$(package-dir) help
@echo ''
+ @echo 'Build configuration retrieval:'
+ @echo ' kernellocalversion - Print kernel local version (CONFIG_LOCALVERSION)'
+ @echo ' kernelarch - Print kernel architecture'
+ @echo ''
@echo 'Documentation targets:'
@$(MAKE) -f $(srctree)/Documentation/Makefile dochelp
@echo ''
@@ -1728,6 +1732,12 @@ kernelrelease:
kernelversion:
@echo $(KERNELVERSION)
+kernellocalversion:
+ @$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree) | sed -e 's~^\-~~'
+
+kernelarch:
+ @echo $(ARCH)
+
image_name:
@echo $(KBUILD_IMAGE)
trivial rule to print out the kernel arch and localversion, so external tools, like distro packagers, can easily get it. v2: add help text Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+)