nodist_pkginclude_HEADERS = config.h
if MAINTAINER_MODE
-ChangeLog: .hg/dirstate
- hg log -r tip:fef8259e7277 --style=changelog > ChangeLog
+ChangeLog: .git/ORIG_HEAD
+ git log 2.2.alpha1..HEAD > ChangeLog
endif
aclocal_DATA = dovecot.m4
abspath "${SRCDIR}" 1
abspath "${BUILDDIR}" 2
-# when using a different BUILDDIR just copy from SRCDIR, if there is no .hg
+# when using a different BUILDDIR just copy from SRCDIR, if there is no .git
if [ "${BUILDDIR}" != "${SRCDIR}" ]; then
- if [ ! -d "${SRCDIR}/.hg" ] && [ -f "${SRCDIR}/${VERSION_H}" ]; then
+ if [ ! -d "${SRCDIR}/.git" ] && [ -f "${SRCDIR}/${VERSION_H}" ]; then
cmp -s "${SRCDIR}/${VERSION_H}" "${BUILDDIR}/${VERSION_H}"
if [ $? -ne 0 ]; then
cp "${SRCDIR}/${VERSION_H}" "${BUILDDIR}/${VERSION_H}"
fi
fi
-# Don't generate dovecot-version.h if the source tree has no .hg dir but
+# Don't generate dovecot-version.h if the source tree has no .git dir but
# a dovecot-version.h. This may be the result of a release/nightly tarball.
-[ ! -d "${SRCDIR}/.hg" ] && [ -f "${BUILDDIR}/${VERSION_H}" ] && exit 0
+[ ! -d "${SRCDIR}/.git" ] && [ -f "${BUILDDIR}/${VERSION_H}" ] && exit 0
# Lets generate the dovecot-version.h
[ -f "${BUILDDIR}/${VERSION_HT}" ] && rm -f "${BUILDDIR}/${VERSION_HT}"
-python "${SRCDIR}/is-tagged.py" "${SRCDIR}"
-if [ $? = 1 ]; then
- # older hg doesn't recognize option -i
- #HGID=`hg -R ${SRCDIR} id -i 2>/dev/null`
- HGID=`hg -R ${SRCDIR} id 2>/dev/null | awk '{print $1}'`
+if true; then
+ GITID=`git rev-parse --short HEAD`
cat > "${BUILDDIR}/${VERSION_HT}" <<EOF
#ifndef DOVECOT_VERSION_H
#define DOVECOT_VERSION_H
-#define DOVECOT_VERSION_FULL VERSION" (${HGID})"
+#define DOVECOT_VERSION_FULL VERSION" (${GITID})"
#endif /* DOVECOT_VERSION_H */
EOF