From: Daniel Carl Date: Tue, 15 Oct 2013 21:49:10 +0000 (+0200) Subject: Removed the git version stuff. X-Git-Url: https://git.owens.tech/editable-focus.html/editable-focus.html/git?a=commitdiff_plain;h=6a12f1dc55fae8bb68273d559857a7e73c726bb4;p=vimb.git 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. --- 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) {