mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-03 06:22:18 +02:00
Update Makefile (#417)
* 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.
This commit is contained in:
parent
99c0267c7a
commit
58c2805237
9
Makefile
9
Makefile
|
@ -1,7 +1,8 @@
|
||||||
DC ?= dmd
|
DC ?= dmd
|
||||||
|
RELEASEVER = v2.2.6
|
||||||
pkgconfig := $(shell if [ $(PKGCONFIG) ] && [ "$(PKGCONFIG)" != 0 ] ; then echo 1 ; else echo "" ; fi)
|
pkgconfig := $(shell if [ $(PKGCONFIG) ] && [ "$(PKGCONFIG)" != 0 ] ; then echo 1 ; else echo "" ; fi)
|
||||||
notifications := $(shell if [ $(NOTIFICATIONS) ] && [ "$(NOTIFICATIONS)" != 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)
|
ifeq ($(pkgconfig),1)
|
||||||
LIBS = $(shell pkg-config --libs sqlite3 libcurl)
|
LIBS = $(shell pkg-config --libs sqlite3 libcurl)
|
||||||
|
@ -126,5 +127,9 @@ endif
|
||||||
for i in $(DOCFILES) ; do rm -f $(DESTDIR)$(DOCDIR)/$$i ; done
|
for i in $(DOCFILES) ; do rm -f $(DESTDIR)$(DOCDIR)/$$i ; done
|
||||||
rm -f $(DESTDIR)$(MANDIR)/onedrive.1
|
rm -f $(DESTDIR)$(MANDIR)/onedrive.1
|
||||||
|
|
||||||
version: .git/HEAD .git/index
|
version:
|
||||||
|
ifeq ($(gitversion),1)
|
||||||
echo $(shell git describe --tags) > version
|
echo $(shell git describe --tags) > version
|
||||||
|
else
|
||||||
|
echo $(RELEASEVER) > version
|
||||||
|
endif
|
Loading…
Reference in a new issue