srcdir=$(dirname $0)
cd "$srcdir"
+EXPECTED_TREE_VERSION="22.1.14"
+
emacs_is_beta=t
if test -n "$GIT" -a -n "$($GIT symbolic-ref HEAD 2>/dev/null)"; then
TREE_VERSION="$($GIT tag|tail -n1|tr -d v)"
IN_GIT="1"
fi
if test -z "$TREE_VERSION"; then
- TREE_VERSION="22.1.14"
+ TREE_VERSION="$EXPECTED_TREE_VERSION"
if test -n "$IN_GIT"; then
- echo "If you cloned this branch into your own you should issue: git tag -s v${TREE_VERSION}.<your branch_name>"
+ echo "If you cloned this branch into your own you should issue:"
+ echo "\tgit tag -s v${TREE_VERSION}.<your branch_name>"
+ echo "\tgit push --tag"
fi
fi
if test -z "$GIT_VERSION"; then
emacs_major_version="$(echo $TREE_VERSION|cut -d. -f1)"
emacs_minor_version="$(echo $TREE_VERSION|cut -d. -f2)"
emacs_beta_version="$(echo $TREE_VERSION|cut -d. -f3)"
+emacs_full_version="$emacs_major_version.$emacs_minor_version.$emacs_beta_version"
sxemacs_codename="Geo"
sxemacs_git_version="$GIT_VERSION"
+if test "$emacs_full_version" != "$EXPECTED_TREE_VERSION"; then
+ # Note, there is no need check for git repos, because
+ # it can only happen in such a case anyway...
+ echo "*******************************************"
+ echo " WARNING: Your git tags may be out of date "
+ echo ""
+ echo " Expected tree version $EXPECTED_TREE_VERSION "
+ echo " got $emacs_full_version (from $TREE_VERSION) "
+ set -x
+ git tag
+ git describe
+ git describe --long
+ git config -l
+ set +x
+ echo "*******************************************"
+fi
+
autoconf_ver=$(autoconf --version 2>/dev/null | head -n1)
autoheader_ver=$(autoheader --version 2>/dev/null | head -n1)
automake_ver=$(automake --version 2>/dev/null | head -n1)
cat>sxemacs_version.m4<<EOF
dnl autogenerated version number
-m4_define([SXEM4CS_VERSION], [$emacs_major_version.$emacs_minor_version.$emacs_beta_version])
+m4_define([SXEM4CS_VERSION], [$emacs_full_version])
m4_define([SXEM4CS_MAJOR_VERSION], [$emacs_major_version])
m4_define([SXEM4CS_MINOR_VERSION], [$emacs_minor_version])
m4_define([SXEM4CS_BETA_VERSION], [$emacs_beta_version])