aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2018-11-13 18:11:53 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2018-11-13 18:11:53 +0100
commit98b4c9f276a18535b5691e5f350f59ffbf5a9aa5 (patch)
tree2804f307f92463436ed9d7faaae1f7e796058ddb /utils/cec-compliance
parentdd3ff81f58c4e1e6f33765dc61ad33c48ae6bb07 (diff)
v4l-utils: fix SHA detection
Check if there is a .git directory at the top-level, and only then get the SHA of the HEAD. If the release tarball (which doesn't have a .git directory) is extracted inside another git repo, then the current SHA code would find the SHA of the enclosing git repo, which is not what you want. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'utils/cec-compliance')
-rw-r--r--utils/cec-compliance/Makefile.am4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/cec-compliance/Makefile.am b/utils/cec-compliance/Makefile.am
index 5217046c..0c18a9ab 100644
--- a/utils/cec-compliance/Makefile.am
+++ b/utils/cec-compliance/Makefile.am
@@ -17,9 +17,9 @@ cec-table.h: $(top_srcdir)/utils/cec-ctl/msg2ctl.pl $(top_srcdir)/include/linux/
cec-compliance.cpp: version.h
version.h:
- @if git -C $(srcdir) rev-parse HEAD >/dev/null 2>&1; then \
+ @if [ -d $(top_srcdir)/.git ]; then \
echo -n "#define SHA " >$@ ; \
- git -C $(srcdir) rev-parse HEAD >>$@ ; \
+ git -C $(top_srcdir) rev-parse HEAD >>$@ ; \
else \
touch $@ ; \
fi

Privacy Policy