Fix rebuilding of onedrive, but ensure version is properly updated (#731)

* Fix rebuilding of onedrive, but ensure version is properly updated
This commit is contained in:
Norbert Preining 2019-11-23 09:33:22 +09:00 committed by abraunegg
parent 8ecd1989b4
commit 4fcab8ff56

View file

@ -95,7 +95,12 @@ distclean: clean
rm -f Makefile contrib/pacman/PKGBUILD contrib/spec/onedrive.spec onedrive.1 \
$(system_unit_files) $(user_unit_files)
onedrive: version $(SOURCES)
onedrive: $(SOURCES)
if [ -f .git/HEAD ] ; then \
git describe --tags > version ; \
else \
echo $(version) > version ; \
fi
$(DC) $(DCFLAGS) $(addprefix -L,$(curl_LIBS)) $(addprefix -L,$(sqlite_LIBS)) $(addprefix -L,$(notify_LIBS)) -L-ldl $(SOURCES) -of$@
install: all
@ -148,10 +153,4 @@ ifeq ($(COMPLETIONS),yes)
rm -f $(DESTDIR)$(BASH_COMPLETION_DIR)/onedrive
endif
version:
if [ -f .git/HEAD ] ; then \
git describe --tags > version ; \
else \
echo $(version) > version ; \
fi