diff options
author | Steffen Trumtrar <s.trumtrar@pengutronix.de> | 2020-09-23 12:34:15 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-09-25 16:28:04 +0200 |
commit | 98c221e3fad57f271d60406c9a1869511b26ed37 (patch) | |
tree | c9331a9c59d5d6c49390ae01c8ebfb577d18a811 /scripts | |
parent | cbfaec5633457fb5dae949be1665ca427bbad067 (diff) | |
download | barebox-98c221e3fad57f271d60406c9a1869511b26ed37.tar.gz barebox-98c221e3fad57f271d60406c9a1869511b26ed37.tar.xz |
Makefile: add buildsystem version variable
Introduce a new variable to store a buildsystem version information.
The exact information that is stored here (git commit, git tag,...) is
defined by the buildsystem.
It is intended to have the possibility to get information about the
exact barebox binary, environment and configuration.
The variable is utilized the same as KERNELVERSION for linux:
make BUILDSYSTEM_VERSION=$COMMITISH
Via scripts/mkcompile_h this information is injected into the barebox
codebase.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/mkcompile_h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index 60b20cafc6..49aadc153d 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h @@ -54,6 +54,7 @@ fi UTS_VERSION="#$VERSION" CONFIG_FLAGS="" UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP" +BUILDSYSTEM_VERSION="$BUILDSYSTEM_VERSION" # Truncate to maximum length @@ -69,6 +70,8 @@ UTS_TRUNCATE="cut -b -$UTS_LEN" echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\" + echo \#define BUILDSYSTEM_VERSION \"`echo $BUILDSYSTEM_VERSION`\" + echo \#define BAREBOX_COMPILE_BY \"`echo $BAREBOX_COMPILE_BY | $UTS_TRUNCATE`\" echo \#define BAREBOX_COMPILE_HOST \"`echo $BAREBOX_COMPILE_HOST | $UTS_TRUNCATE`\" |