aboutsummaryrefslogtreecommitdiffstats
path: root/utils/v4l2-compliance/Makefile.am
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2016-07-07 13:16:57 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2016-07-07 13:16:57 +0200
commit54f4835e5f0a4561b9711eee01a49eafc666be4c (patch)
tree504ffea26151bb3421b084cb2bc07c893a7d29fd /utils/v4l2-compliance/Makefile.am
parent04ad7280f20c6d66cf4a47b650c9694f9df552fd (diff)
v4l2-compliance: show SHA from which it was built.
To be able to check which version of v4l2-compliance was used when testing, add the SHA so this can be printed in the output. It is important that a recent version is used, but without the SHA I can't tell that. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils/v4l2-compliance/Makefile.am')
-rw-r--r--utils/v4l2-compliance/Makefile.am14
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/v4l2-compliance/Makefile.am b/utils/v4l2-compliance/Makefile.am
index 5b053c59..a895e8eb 100644
--- a/utils/v4l2-compliance/Makefile.am
+++ b/utils/v4l2-compliance/Makefile.am
@@ -15,3 +15,17 @@ DEFS += -DNO_LIBV4L2
endif
EXTRA_DIST = Android.mk fixme.txt v4l2-compliance.1
+
+v4l2-compliance.cpp: version.h
+
+version.h:
+ @if git show-ref -s HEAD >/dev/null 2>&1; then \
+ echo -n "#define SHA " >$@ ; \
+ git show-ref -s HEAD >>$@ ; \
+ else \
+ touch $@ ; \
+ fi
+
+clean-local:
+ -rm -vf version.h
+

Privacy Policy