diff --git a/Makefile b/Makefile
index 7de57de0d3d4ea794ea7d47ed1cdd81dae1a72d5..58e526623898e28f1262ff3892d139b8ab73f4a1 100644
--- a/Makefile
+++ b/Makefile
@@ -179,7 +179,7 @@ setversion:
 .PHONY: autoversion
 autoversion:
 	@( \
-	if [ -d "./git" ] && $$(which git) ; then \
+	if [ -d ".git" ] && $$(which git) ; then \
 		DETECTED_VERSION=$$(git describe --always --tags --dirty) ; \
 	else \
 		DETECTED_VERSION=$$(grep -v "^#" "$(RELEASED_VERSION_FILE)") ; \