librb: it's pretty obvious this has been updated since 2008.

Add code to properly generate SERNO accordingly.
This commit is contained in:
Elizabeth Myers 2016-03-07 00:23:30 -06:00
parent e09ee7faad
commit d9e4f6f074
2 changed files with 12 additions and 2 deletions

View file

@ -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

View file

@ -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])