diff --git a/librb/Makefile.am b/librb/Makefile.am index c8cb6fc2..245174b8 100644 --- a/librb/Makefile.am +++ b/librb/Makefile.am @@ -4,3 +4,15 @@ SUBDIRS = src pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = librb.pc + +BUILT_SOURCES = include/serno.h + +include/serno.h: + @if [ -d .git ] ; then \ + revh=`git log -1 --date=short --pretty=format:%cd_%h 2>/dev/null | sed -e s/-//g -e s/_/-/`;\ + [ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \ + elif [ -d .hg ] ; then \ + revh=`hg parents --template '{date|shortdate}_{node|short}' 2>/dev/null | sed -e s/-//g -e s/_/-/`;\ + [ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \ + fi + @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h diff --git a/librb/configure.ac b/librb/configure.ac index 511ab467..a76488a1 100644 --- a/librb/configure.ac +++ b/librb/configure.ac @@ -1,4 +1,3 @@ -dnl $Id: configure.ac 26260 2008-12-10 04:08:39Z androsyn $ dnl Process this file with autoconf to produce a configure script. dnl TODO: clean up all the OpenSSL and shared module checking stuff; @@ -8,7 +7,6 @@ dnl said functions need to be just about as complex as they already are. AC_PREREQ(2.63) AUTOMAKE_OPTIONS = 1.10 dnl Sneaky way to get an Id tag into the configure script -AC_COPYRIGHT([$Id: configure.ac 26260 2008-12-10 04:08:39Z androsyn $]) AC_INIT([librb],[devel]) AM_INIT_AUTOMAKE([subdir-objects]) AM_SILENT_RULES([yes])