Skip to content

Commit

Permalink
add git revision ID to config.h
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinChu committed Dec 16, 2016
1 parent 3ae0ea4 commit 40edfa1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([BioBloomMaker/BioBloomMaker.cpp])
AC_CONFIG_HEADER([config.h])


AC_REVISION([m4_esyscmd([./tools/configure.commit])])

AC_PROG_RANLIB

# Checks for programs.
Expand Down
10 changes: 10 additions & 0 deletions tools/configure.commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /bin/sh
# Display the SHA1 of the commit in which configure.ac was last modified.
# If it's not checked in yet, use the SHA1 of HEAD plus -dirty.

if [ ! -d .git ] ; then
# if no .git directory, assume they're not using Git
printf 'no_git'
else
git describe --abbrev=4 --dirty --always --tags | xargs echo -n
fi

0 comments on commit 40edfa1

Please sign in to comment.