diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2021-04-20 09:52:05 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2021-04-20 14:05:53 +0200 |
commit | 5b3355e3e54344fab7fc264b69d88ef10b889427 (patch) | |
tree | 815f1abed1806f76b10a274ea633eac90c82ddc9 | |
parent | cd138c90d94385a816fb463d47f62b21fdc29106 (diff) | |
download | v4l-utils-5b3355e3e54344fab7fc264b69d88ef10b889427.tar.gz |
configure.ac: Resolve GIT_* even if repository is a submodule
If the v4l-utils repository is a git submodule the $(top_srcdir)/.git is
a file and not a directory. Update the shell checks to allow the test to
pass in both cases.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r-- | configure.ac | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 8470116d..a79bf517 100644 --- a/configure.ac +++ b/configure.ac @@ -588,13 +588,13 @@ fi CPPFLAGS="-I\$(top_srcdir)/lib/include -Wall -Wpointer-arith -D_GNU_SOURCE $CPPFLAGS" # Obtain git SHA of HEAD -AC_SUBST(GIT_SHA, ["-DGIT_SHA=\$(shell if test -d \$(top_srcdir)/.git ; then git -C \$(top_srcdir) rev-parse --short=12 HEAD ; fi)"]) +AC_SUBST(GIT_SHA, ["-DGIT_SHA=\$(shell if test -e \$(top_srcdir)/.git ; then git -C \$(top_srcdir) rev-parse --short=12 HEAD ; fi)"]) # Obtain git commit count of HEAD -AC_SUBST(GIT_COMMIT_CNT, ["-DGIT_COMMIT_CNT=\$(shell if test -d \$(top_srcdir)/.git ; then printf '-'; git -C \$(top_srcdir) rev-list --count HEAD ; fi)"]) +AC_SUBST(GIT_COMMIT_CNT, ["-DGIT_COMMIT_CNT=\$(shell if test -e \$(top_srcdir)/.git ; then printf '-'; git -C \$(top_srcdir) rev-list --count HEAD ; fi)"]) # Obtain git commit date of HEAD -AC_SUBST(GIT_COMMIT_DATE, ["-DGIT_COMMIT_DATE=\$(shell if test -d \$(top_srcdir)/.git ; then printf '\"'; TZ=UTC git -C \$(top_srcdir) show --quiet --date='format-local:%F %T\"' --format=\"%cd\"; fi)"]) +AC_SUBST(GIT_COMMIT_DATE, ["-DGIT_COMMIT_DATE=\$(shell if test -e \$(top_srcdir)/.git ; then printf '\"'; TZ=UTC git -C \$(top_srcdir) show --quiet --date='format-local:%F %T\"' --format=\"%cd\"; fi)"]) AM_COND_IF([WITH_LIBDVBV5], [USE_LIBDVBV5="yes"], [USE_LIBDVBV5="no"]) AM_COND_IF([WITH_DVBV5_REMOTE], [USE_DVBV5_REMOTE="yes" |