auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. e4cde665461df3397113a


From: Mosè Giordano
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. e4cde665461df3397113aea7e1976eeec01f5dfc
Date: Sun, 15 Nov 2015 12:24:05 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  e4cde665461df3397113aea7e1976eeec01f5dfc (commit)
      from  c2fbb9ca83509d46141a55fca473215b176dc9c7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e4cde665461df3397113aea7e1976eeec01f5dfc
Author: Mosè Giordano <address@hidden>
Date:   Sun Nov 15 13:09:24 2015 +0100

    Determine AUCTEXDATE and AUCTEXVERSION from git
    
    * aclocal.m4 (AC_DATE_VERSION_FROM_CHANGELOG): if this is git
      repository, use it to determine the variables.
    * autogen.sh: Ditto.

diff --git a/aclocal.m4 b/aclocal.m4
index 9b29ec0..b701653 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -93,21 +93,39 @@ fi
 ])
 
 AC_DEFUN(AC_DATE_VERSION_FROM_CHANGELOG, [
-AC_MSG_CHECKING([for date in ChangeLog])
-$1=[`sed -n '1s/^\([-0-9][-0-9]*\).*/\1/p' "$3"`]
+AC_MSG_CHECKING([for date with git])
+$1=[`git log -1 --date=short --format=%ad 2> /dev/null`]
 if test "X${$1}" = X
 then
-  AC_MSG_ERROR([[not found]])
+  AC_MSG_RESULT([git not found, checking for date in ChangeLog:])
+  $1=[`sed -n '1s/^\([-0-9][-0-9]*\).*/\1/p' "$3"`]
+  if test "X${$1}" = X
+  then
+    AC_MSG_ERROR([[not found]])
+  fi
 fi
 AC_MSG_RESULT(${$1})
-AC_MSG_CHECKING([for release in ChangeLog])
-$2=[`sed -n '2,/^[0-9]/s/.*Version \(.*\) released\..*/\1/p' "$3"`]
-if test "X${$2}" = X
+
+AC_MSG_CHECKING([for release with git])
+if git describe --tags > /dev/null 2> /dev/null
 then
-  $2=${$1}
-  AC_MSG_RESULT([not found, using ${$2} instead])
+  if test "X`git describe --tags | sed 's/release_.._..//'`" = X
+  then
+    $2=[`git describe --tags`]
+  else
+    $2=${$1}
+    AC_MSG_RESULT([not found, using ${$2} instead])
+  fi
 else
-  AC_MSG_RESULT([${$2}])
+  AC_MSG_RESULT([git not found, checking for release in ChangeLog:])
+  $2=[`sed -n '2,/^[0-9]/s/.*Version \(.*\) released\..*/\1/p' "$3"`]
+  if test "X${$2}" = X
+  then
+    $2=${$1}
+    AC_MSG_RESULT([not found, using ${$2} instead])
+  else
+    AC_MSG_RESULT([${$2}])
+  fi
 fi
 ])
 
diff --git a/autogen.sh b/autogen.sh
index 6b2bd73..1bed156 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -32,14 +32,29 @@ ${AUTOCONF} || { echo "Error running ${AUTOCONF} in ." >&2 
; exit 1; }
 rm -rf autom4te.cache
 if test "x${AUCTEXDATE}" = x
 then
-    AUCTEXDATE=`LC_ALL=C sed -n '1s/^\([-0-9][-0-9]*\).*/\1/p' ChangeLog.1`
-    test "X${AUCTEXDATE}" != X || { echo "Can't find date in ChangeLog.1" >&2 
; exit 1; }
+    AUCTEXDATE=`git log -1 --date=short --format=%ad 2> /dev/null`
+    if test "X${AUCTEXDATE}" = X
+    then
+       echo "Can't find date with git, trying with ChangeLog.1..." >&2
+       AUCTEXDATE=`LC_ALL=C sed -n '1s/^\([-0-9][-0-9]*\).*/\1/p' ChangeLog.1`
+       test "X${AUCTEXDATE}" != X || { echo "Can't find date in ChangeLog.1" 
>&2 ; exit 1; }
+    fi
 fi
 
 if test "x${AUCTEXVERSION}" = x
 then
-    AUCTEXVERSION=`sed -n '2,/^[0-9]/s/.*Version \(.*\) released\..*/\1/p' 
ChangeLog.1`
-    test "X${AUCTEXVERSION}" != X || AUCTEXVERSION=${AUCTEXDATE}
+    if git describe --tags >/dev/null 2> /dev/null
+    then
+       if test "X`git describe --tags | sed 's/release_.._..//'`" = X
+       then
+           AUCTEXVERSION=`git describe --tags`
+       else
+           AUCTEXVERSION=${AUCTEXDATE}
+       fi
+    else
+       AUCTEXVERSION=`sed -n '2,/^[0-9]/s/.*Version \(.*\) released\..*/\1/p' 
ChangeLog.1`
+       test "X${AUCTEXVERSION}" != X || AUCTEXVERSION=${AUCTEXDATE}
+    fi
 fi
 
 cd doc

-----------------------------------------------------------------------

Summary of changes:
 aclocal.m4 |   36 +++++++++++++++++++++++++++---------
 autogen.sh |   23 +++++++++++++++++++----
 2 files changed, 46 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]