From d9e4f6f0749abcbb0821403764b07f49956b01f8 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Mon, 7 Mar 2016 00:23:30 -0600 Subject: [PATCH] librb: it's pretty obvious this has been updated since 2008. Add code to properly generate SERNO accordingly. --- librb/Makefile.am | 12 ++++++++++++ librb/configure.ac | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/librb/Makefile.am b/librb/Makefile.am index c8cb6fc21..245174b86 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 511ab467d..a76488a12 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])