From 207b57869d7ed44950a51bbd9632a8549d7a9c49 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sat, 18 Apr 2015 00:57:26 -0400 Subject: only define GIT_VERSION where it's used -when the git revision is passed to every file as a define it causes unnecessary ccache cache misses --- src/systemcmds/ver/module.mk | 2 ++ src/systemcmds/ver/ver.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/systemcmds/ver') diff --git a/src/systemcmds/ver/module.mk b/src/systemcmds/ver/module.mk index 2eeb80b61..4597b5f11 100644 --- a/src/systemcmds/ver/module.mk +++ b/src/systemcmds/ver/module.mk @@ -42,3 +42,5 @@ SRCS = ver.c MODULE_STACKSIZE = 1024 MAXOPTIMIZATION = -Os + +EXTRADEFINES = -DGIT_VERSION='"$(GIT_DESC)"' diff --git a/src/systemcmds/ver/ver.c b/src/systemcmds/ver/ver.c index 087eb52e3..b794e8b2f 100644 --- a/src/systemcmds/ver/ver.c +++ b/src/systemcmds/ver/ver.c @@ -101,7 +101,7 @@ int ver_main(int argc, char *argv[]) } if (show_all || !strncmp(argv[1], sz_ver_git_str, sizeof(sz_ver_git_str))) { - printf("FW git-hash: %s\n", FW_GIT); + printf("FW git-hash: %s\n", GIT_VERSION); ret = 0; } -- cgit v1.2.3