From db29918b0ec64b8564eb209332c9bda39c4f7e5b Mon Sep 17 00:00:00 2001 From: fengweihao Date: Fri, 30 Nov 2018 21:17:04 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=9C=A8=E4=BA=8C=E8=BF=9B=E5=88=B6=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E5=A2=9E=E5=8A=A0=E7=89=88=E6=9C=AC=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Makefile | 3 +++ src/cert_store.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 2a6117a..73eaf7e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -8,6 +8,7 @@ BUILD=$(shell git log | grep -cE 'Author:.*<.*@.*>') BUILDSHA=$(shell git rev-parse --short HEAD) BUILD_FINGERPRINT=$(MAJOR).$(BUILD).$(BUILDSHA) +VERSION_TARGET:=$(BUILDSHA) # Default simulation parameters NUM_PROCESSORS=1 @@ -64,6 +65,8 @@ CFLAGS_LOCAL = -std=gnu99 -g -O3 -W -Wall \ -I./inc \ DEPS := $(objs:.o=.d) + +CFLAGS_GLOBAL += -DVERSION_TARGET=\"$(VERSION_TARGET)\" CLEAN_LIST := $(CLEAN_LIST) $(OBJS) $(DEPS) $(TARGET_LIB) $(OBJ_DIR) diff --git a/src/cert_store.c b/src/cert_store.c index 11f7a21..c97b756 100644 --- a/src/cert_store.c +++ b/src/cert_store.c @@ -19,7 +19,7 @@ #include "MESA_prof_load.h" /* GIT Release */ -#define CERT_GIT_RELEASE "1.1.0" +#define CERT_GIT_RELEASE "1.1" #define MODE_TYPE(x) run_mode & x @@ -30,6 +30,12 @@ #define CERT_BASIC_CFG "./conf/cert_store.ini" #endif +#ifdef VERSION_TARGET +char *git_ver = VERSION_TARGET; +#else +char *git_ver = "0" +#endif + static char* cert_revision() { return (CERT_GIT_RELEASE); } enum syslog_display_format{ @@ -42,7 +48,7 @@ static int run_mode; static void help() { - printf("Welcome to CertStore %s\n", cert_revision()); + printf("Welcome to certstore %s.%s\n", cert_revision(), VERSION_TARGET); printf("cert_store <--normal|--daemon>\n" "Usage:\n" " --normal | Run the program in normal mode\n"