It happens when using a worktree.
__force-changelog-generation:
ChangeLog: __force-changelog-generation
- $(AM_V_GEN)if test -d $(top_srcdir)/.git; then \
+ $(AM_V_GEN)if test -e $(top_srcdir)/.git; then \
prev=$$(git describe --tags --always --match '[0-9]*' 2> /dev/null) ; \
for tag in $$(git tag | $(EGREP) '^[0-9]+(\.[0-9]+){1,}$$' | sort -t. -k 1,1nr -k 2,2nr -k 3,3nr); do \
if [ x"$$prev" = x ]; then prev=$$tag ; fi ; \
set -e
-[ ! -d .gitmodules ] || {
+[ ! -e .gitmodules ] || {
echo "autogen.sh: updating git submodules"
git submodule init
git submodule update
if [ -f .dist-version ]; then
# Get the version from the file distributed in the tarball.
version=$(cat .dist-version)
-elif [ -d .git ]; then
+elif [ -e .git ]; then
# Ger the version from the git repository.
version=$(git describe --tags --always --match [0-9]* 2> /dev/null)