[Pkg-gnupg-commit] [libassuan] 392/437: Beautify the BUILD_TIMESTAMP and put it into the binary.

Eric Dorland eric at moszumanska.debian.org
Fri May 22 05:34:08 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libassuan.

commit c6c80414201a1c58e24220ff9ea214c7164ccc8d
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Feb 22 16:45:15 2013 +0100

    Beautify the BUILD_TIMESTAMP and put it into the binary.
    
    * configure.ac (BUILD_TIMESTAMP): Use an ISO date string on all
    platforms and ac_define it.
    * src/sysutils.c (_assuan_sysutils_blurb): But revision and build date
    into the binary.
    --
    
    An ISO date is for sure better than the old C standard time format.
    An almost all platforms this should work.  We don't print the seconds
    to be compatible with the way we did in on Windows.  However we print
    in UTC.
---
 configure.ac   | 9 +++------
 src/sysutils.c | 4 +++-
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7ca1108..28b2c35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -240,13 +240,10 @@ changequote([,])dnl
 BUILD_FILEVERSION="${BUILD_FILEVERSION}mym4_revision_dec"
 AC_SUBST(BUILD_FILEVERSION)
 
-if test "$have_w32_system" = yes; then
-    dnl We know that we have a decent date(1)
-    BUILD_TIMESTAMP=`date --iso-8601=minutes`
-else
-    BUILD_TIMESTAMP=`date`
-fi
+BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
 AC_SUBST(BUILD_TIMESTAMP)
+AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP",
+                   [The time this package was configured for a build])
 
 
 
diff --git a/src/sysutils.c b/src/sysutils.c
index 3a23378..6951ceb 100644
--- a/src/sysutils.c
+++ b/src/sysutils.c
@@ -46,7 +46,9 @@ _assuan_sysutils_blurb (void)
     "\n\n"
     "This is Libassuan " PACKAGE_VERSION " - The GnuPG IPC Library\n"
     "Copyright 2000, 2002, 2003, 2004, 2007, 2008, 2009,\n"
-    "          2010, 2011 Free Software Foundation, Inc.\n"
+    "          2010, 2011, 2013 Free Software Foundation, Inc.\n"
+    "\n"
+    "(" BUILD_REVISION " " BUILD_TIMESTAMP ")\n"
     "\n\n";
   return blurb;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git



More information about the Pkg-gnupg-commit mailing list