Removed the git version stuff.
authorDaniel Carl <danielcarl@gmx.de>
Tue, 15 Oct 2013 21:49:10 +0000 (23:49 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Tue, 15 Oct 2013 21:52:08 +0000 (23:52 +0200)
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
src/main.c

index f7830f1..ee7ea96 100644 (file)
--- 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)
index 33aaa4e..50b9eee 100644 (file)
@@ -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) {