Correctly determine git SHA if libdivecomputer is a git submodule

In the case of a submodule, the .git file is a text file pointing to the
correct module in the parent's .git folder. The git rev-parse works
correctly in both cases.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-12-06 21:23:19 -06:00 committed by Jef Driesen
parent 42f8e012b7
commit ca1efdcecd

View File

@ -100,7 +100,7 @@ libdivecomputer.lo: revision.h
FORCE:
$(top_srcdir)/revision: FORCE
@if (test -d $(top_srcdir)/.git && cd $(top_srcdir) \
@if (test -e $(top_srcdir)/.git && cd $(top_srcdir) \
&& git rev-parse --verify HEAD) > revision-t 2>/dev/null \
&& ! cmp -s revision-t $@; then \
mv -f revision-t $@; \