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:
parent
f5aee8198f
commit
db70c581a6
@ -97,7 +97,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 $@; \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user