Skip to content

Commit

Permalink
Update Makefile (#417)
Browse files Browse the repository at this point in the history
* Update makefile so if using 'release' archive to build, the 'version' file is created with the correct version string as .git/HEAD & index is not available.
  • Loading branch information
abraunegg authored Mar 19, 2019
1 parent 99c0267 commit 58c2805
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
DC ?= dmd

RELEASEVER = v2.2.6
pkgconfig := $(shell if [ $(PKGCONFIG) ] && [ "$(PKGCONFIG)" != 0 ] ; then echo 1 ; else echo "" ; fi)
notifications := $(shell if [ $(NOTIFICATIONS) ] && [ "$(NOTIFICATIONS)" != 0 ] ; then echo 1 ; else echo "" ; fi)
gitversion := $(shell if [ -f .git/HEAD ] ; then echo 1 ; else echo "" ; fi)

ifeq ($(pkgconfig),1)
LIBS = $(shell pkg-config --libs sqlite3 libcurl)
Expand Down Expand Up @@ -126,5 +127,9 @@ endif
for i in $(DOCFILES) ; do rm -f $(DESTDIR)$(DOCDIR)/$$i ; done
rm -f $(DESTDIR)$(MANDIR)/onedrive.1

version: .git/HEAD .git/index
version:
ifeq ($(gitversion),1)
echo $(shell git describe --tags) > version
else
echo $(RELEASEVER) > version
endif

0 comments on commit 58c2805

Please sign in to comment.