From 6a12f1dc55fae8bb68273d559857a7e73c726bb4 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Tue, 15 Oct 2013 23:49:10 +0200 Subject: [PATCH] Removed the git version stuff. The git version could lead to cases where the version seems to be wrong, in the case where no tags are pulled from upstream. So I decided to throw this away. Bay the was the none posix sed command to convert project name to word starting with upper case char, was replaces by a awk call. --- config.mk | 8 ++------ src/main.c | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/config.mk b/config.mk index f7830f1..ee7ea96 100644 --- a/config.mk +++ b/config.mk @@ -25,13 +25,9 @@ LIBS += $(GTK2LIBS) endif # generate a first char upper case project name -PROJECT_UCFIRST = $(shell echo '${PROJECT}' | sed 's/\([a-z]\)\([a-zA-Z0-9]*\)/\u\1\2/') +PROJECT_UCFIRST = $(shell echo '${PROJECT}' | awk '{for(i=1;i<=NF;i++){$$i=toupper(substr($$i,1,1))substr($$i,2)}}1') -# try to get a better version string from git -GIT_VERSION = $(shell git describe --tags | tr -d '\n') -FULL_VERSION = $(shell if [ "$(GIT_VERSION)" ]; then echo "$(GIT_VERSION)"; else echo "$(VERSION)"; fi) - -CPPFLAGS = -DVERSION=\"${VERSION}\" -DFULL_VERSION=\"${FULL_VERSION}\" +CPPFLAGS = -DVERSION=\"${VERSION}\" CPPFLAGS += -DPROJECT=\"${PROJECT}\" -DPROJECT_UCFIRST=\"${PROJECT_UCFIRST}\" CPPFLAGS += -D_BSD_SOURCE -D_XOPEN_SOURCE=500 ifeq ($(USEGTK3), 1) diff --git a/src/main.c b/src/main.c index 33aaa4e..50b9eee 100644 --- a/src/main.c +++ b/src/main.c @@ -1005,7 +1005,7 @@ int main(int argc, char *argv[]) } if (ver) { - fprintf(stdout, "%s/%s\n", PROJECT, FULL_VERSION); + fprintf(stdout, "%s/%s\n", PROJECT, VERSION); return EXIT_SUCCESS; } if (dump) { -- 2.20.1