[PATCH] Makefile: update barebox version if CONFIG_KALLSYMS is not set

Svetlana Khafizova sv.khafizova at gmail.com
Mon Jul 23 09:36:48 EDT 2012

If CONFIG_KALLSYMS is not set then barebox version is always "#0".
By-default on mips boards CONFIG_KALLSYMS don't set, so barebox
version does not increase after every build.
This patch fixes the problem.

Signed-off-by: Svetlana Khafizova <sv.khafizova at gmail.com>
Signed-off-by: Aleksey Kuleshov <rndfax at yandex.ru>
Acked-by:: Antony Pavlov <antonynpavlov at gmail.com>
 Makefile |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index ebcf9bf..ac5eaaf 100644
--- a/Makefile
+++ b/Makefile
@@ -549,12 +549,13 @@ quiet_cmd_sysmap = SYSMAP
       cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap
 # Link of barebox
+# If CONFIG_KALLSYMS is set .version is already updated
 # Generate System.map and verify that the content is consistent
 # Use + in front of the barebox_version rule to silent warning with make -j2
 # First command is ':' to allow us to use + in front of the rule
 define rule_barebox__
+	$(if $(CONFIG_KALLSYMS),,+$(call cmd,barebox_version))
 	$(call cmd,barebox__)
 	$(Q)echo 'cmd_$@ := $(cmd_barebox__)' > $(@D)/.$(@F).cmd

More information about the barebox mailing list