diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-08 22:27:35 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-08 22:42:28 +0300 |
commit | e523423777dd75acc59cf7b9e7466527d774a9f9 (patch) | |
tree | 6d17e7553373fdfb6f32870902b75874c3f06aae /Makefile.am | |
parent | 79f6b2c923d1c2366b68a431756bde6e4a04ae86 (diff) | |
download | grecs-e523423777dd75acc59cf7b9e7466527d774a9f9.tar.gz grecs-e523423777dd75acc59cf7b9e7466527d774a9f9.tar.bz2 |
Various fixes.
* .gitignore: Add gitid.h
* Makefile.am: Build gitid.h.
* am/grecs.m4: Remove GRECS_VEROK_AT.
* build-aux/getopt.m4 (print_version_hook): New variable.
(print_version): Call print_version_hook, if defined.
* src/Make.am (INCLUDES): Update.
* src/grecs.h (grecs_version_info) <id>: New member.
* src/version.c (grecs_version): Initialize id.
* tests/Makefile.am: Remove GRECS_VEROK_AT.
* tests/testsuite.at: Likewise.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 72619ec..0eb4b0e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,39 @@ -SUBDIRS=src @GRECS_TESTDIR@ @GRECS_DOCDIR@ -EXTRA_DIST=@GRECS_BUILD_AUX@ +# This file is part of Grecs +# Copyright (C) 2007, 2009-2011 Sergey Poznyakoff +# +# Grecs is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# Grecs is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Grecs. If not, see <http://www.gnu.org/licenses/>. + ACLOCAL_AMFLAGS = -I am +SUBDIRS=. src @GRECS_TESTDIR@ @GRECS_DOCDIR@ +EXTRA_DIST=@GRECS_BUILD_AUX@ gitid.h + +noinst_HEADERS = gitid.h +BUILT_SOURCES = gitid.h + +.PHONY: gitid.h +gitid.h: + @if test -d .git; then \ + url=`git config --get remote.origin.url | sed 's|.*://||'`; \ + if test "$$url" = "git.gnu.org.ua/gitroot/grecs.git"; then \ + dirty=`git diff-index --name-only HEAD 2>/dev/null` || dirty=;\ + test -n "$$dirty" && dirty="-dirty"; \ + ID=`git log -1 --pretty='%H-%ct-%ae'`$$dirty;\ + echo "#define GRECS_GIT_ID \"$$ID\"" > gitid.tmp; \ + cmp gitid.tmp gitid.h >/dev/null 2>&1 || mv gitid.tmp gitid.h; \ + rm -f gitid.tmp; \ + fi; \ + fi; @GRECS_CHANGELOG@.PHONY: ChangeLog @GRECS_CHANGELOG@ChangeLog: |