summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastian Blank <waldi@debian.org>2008-03-28 14:13:30 +0000
committerPhilip Hands <phil@hands.com>2022-09-02 17:10:44 +0200
commit7c5e0a35a8af5c2b46be4fad94595facbde58fd5 (patch)
tree37d2922226f8e80d9f3120d4f3dc19d6d467b6b0
parentd86f5b778d33da9f5d0f12509d4731a4d5ee127d (diff)
build-sys: allow override of BB_BT (build tag) from command line
Forwarded: no Gbp-Pq: Name version.patch
-rw-r--r--Makefile.flags4
-rw-r--r--libbb/messages.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/Makefile.flags b/Makefile.flags
index c34356230..158aa32f4 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -17,6 +17,10 @@ CPPFLAGS += \
$(if $(CONFIG_LFS),-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) \
-DBB_VER=$(squote)$(quote)$(BB_VER)$(quote)$(squote)
+ifdef BB_EXTRA_VERSION
+CPPFLAGS += -DBB_BUILD_TAG=$(squote)$(quote)$(BB_EXTRA_VERSION)$(quote)$(squote)
+endif
+
CFLAGS += $(call cc-option,-Wall,)
CFLAGS += $(call cc-option,-Wshadow,)
CFLAGS += $(call cc-option,-Wwrite-strings,)
diff --git a/libbb/messages.c b/libbb/messages.c
index a25d10378..8bc1be3a6 100644
--- a/libbb/messages.c
+++ b/libbb/messages.c
@@ -7,8 +7,11 @@
#include "libbb.h"
/* allow version to be extended, via CFLAGS */
+#ifndef BB_BUILD_TAG
+#define BB_BUILD_TAG AUTOCONF_TIMESTAMP
+#endif
#ifndef BB_EXTRA_VERSION
-#define BB_EXTRA_VERSION " ("AUTOCONF_TIMESTAMP")"
+#define BB_EXTRA_VERSION " ("BB_BUILD_TAG")"
#endif
const char bb_banner[] ALIGN1 = "BusyBox v" BB_VER BB_EXTRA_VERSION;