+if test ! -d .git; then
+ cat <<END_NOT_GIT >&2
+$0: no .git directory, so exiting.
+Long-winded explanation:
+
+The Automake bootstrap script is intended to be run only from the
+top level of a git checkout of Automake, but no .git directory
+is present (in `pwd`), so I'm exiting.
+
+In particular, it should not be run from a source tree expanded from a
+release (or test release, etc.) tarball, because those trees already
+contain everything needed for compilation, with minimal dependencies.
+The development-specific actions of this bootstrap script will mess that
+up, e.g., makeinfo will be required to build after running bootstrap.
+
+(By the way, this bootstrap script is still included in the release
+tarballs even though it is not intended to be run in that context simply
+because it is a nontrivial source file and thus potentially useful to
+developers to see, regardless.)
+
+If you desire to run the bootstrap script in some tree that is not a git
+checkout, just mkdir .git and the script will proceed.
+
+Goodbye from $0.
+END_NOT_GIT
+ exit 1
+fi
+