diff options
author | Nicolas Williams <nico@cryptonector.com> | 2017-03-04 22:57:14 -0600 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2017-03-04 22:57:35 -0600 |
commit | 687812320224e4e5de0080fdb708204891ddec84 (patch) | |
tree | 87215769e60a90e170497db7911c61961dcea724 /configure.ac | |
parent | f7bf9a8e96801d1aaef6148929098c1c92024378 (diff) |
Make configure.ac work for shallow clones
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 1edb4d8e..1c776925 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,7 @@ -m4_define([jq_version], m4_esyscmd_s([git describe --tags --dirty --match 'jq-*'|sed 's/^jq-//'])) +m4_define([jq_version], + m4_esyscmd_s([(git rev-parse --verify -q jq-1.0 > /dev/null && + (git describe --tags --dirty --match 'jq-*'|sed 's/^jq-//')) || + echo `git rev-parse --abbrev-ref HEAD`-`git describe --always --dirty`]))) AC_INIT([jq], [jq_version], [https://github.com/stedolan/jq/issues], [jq], [https://stedolan.github.io/jq]) |