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 /tests | |
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 'tests')
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rw-r--r-- | tests/testsuite.at | 1 | ||||
-rw-r--r-- | tests/verok.at | 63 |
3 files changed, 1 insertions, 67 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index a8bf8d2..0bf7752 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -31,7 +31,6 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac $(top_srcdir)/@GRECS_SUBDIR@/am echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ - echo 'm4_define([GRECS_VEROK_AT], [@GRECS_VEROK_AT@])'; \ echo 'm4_define([GRECS_DISTCK_AT], [@GRECS_DISTCK_AT@])'; \ } >$(srcdir)/package.m4 @@ -57,8 +56,7 @@ TESTSUITE_AT = \ reduce03.at\ set.at\ testsuite.at\ - @GRECS_DISTCK_AT@\ - @GRECS_VEROK_AT@ + @GRECS_DISTCK_AT@ TESTSUITE = $(srcdir)/testsuite M4=m4 diff --git a/tests/testsuite.at b/tests/testsuite.at index 221f536..f307cd8 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -67,6 +67,5 @@ m4_include([reduce03.at]) m4_include([join.at]) m4_include([vercmp.at]) -m4_if(GRECS_VEROK_AT,,,[m4_include(GRECS_VEROK_AT)]) # End of testsuite.at diff --git a/tests/verok.at b/tests/verok.at deleted file mode 100644 index d6064c7..0000000 --- a/tests/verok.at +++ /dev/null @@ -1,63 +0,0 @@ -# This file is part of grecs -*- Autotest -*- -# 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/>. - -AT_SETUP(grecs_version_ok) -AT_KEYWORDS(verok) - -dnl Split Package version into major, minor, patchlevel and suffix - -m4_define([V_MAJOR],[m4_bpatsubst(AT_PACKAGE_VERSION,[\..*])]) -m4_define([V_MINOR],[m4_bpatsubst(AT_PACKAGE_VERSION,[[0-9]+\.\([0-9]+\).*],\1)]) - -m4_define([V_PATCH_TMP],[m4_bpatsubst(AT_PACKAGE_VERSION,[[0-9]+\.[0-9]+\.\([0-9]+\).*],\1)]) -m4_define([V_PATCH],[m4_if(V_PATCH_TMP,AT_PACKAGE_VERSION,[0],V_PATCH_TMP)]) - -m4_pushdef([V_SUFFIX_TMP],[m4_bpatsubst(AT_PACKAGE_VERSION,[[0-9]+\.[0-9]+\(\.[0-9]+\)?])]) -m4_define([V_SUFFIX],[m4_if(V_SUFFIX_TMP,AT_PACKAGE_VERSION,,[ V_SUFFIX_TMP])]) - -dnl Join them back and see if the result matches version. -m4_define([V_OK], -[m4_if(V_MAJOR.V_MINOR[]m4_if(V_PATCH_TMP,AT_PACKAGE_VERSION,,V_PATCH_TMP)dnl -m4_if(V_SUFFIX_TMP,AT_PACKAGE_VERSION,,V_SUFFIX_TMP),AT_PACKAGE_VERSION, -[exit 0], -AT_SKIP_TEST)]) - -AT_CHECK([V_OK]) - -AT_CHECK([gcfver], -[0], -[package: AT_PACKAGE_NAME -version: AT_PACKAGE_VERSION -major: V_MAJOR -minor: V_MINOR -patch: V_PATCH -suffix:V_SUFFIX -]) - -AT_CHECK([gcfver AT_PACKAGE_VERSION], [0]) -AT_CHECK([gcfver "AT_PACKAGE_NAME AT_PACKAGE_VERSION"], [0]) -AT_CHECK([gcfver AT_PACKAGE_VERSION.[foo]], [1]) -AT_CHECK([gcfver "[foo] AT_PACKAGE_VERSION"], [1]) -AT_CHECK([gcfver V_MAJOR], [0]) -AT_CHECK([gcfver V_MAJOR.V_MINOR], [0]) -AT_CHECK([gcfver m4_eval(V_MAJOR+1)], [1]) -AT_CHECK([gcfver V_MAJOR.m4_eval(V_MINOR+1)], [1]) -m4_if(V_MAJOR,0,, - [AT_CHECK([gcfver m4_eval(V_MAJOR-1)],[0]) - AT_CHECK([gcfver m4_eval(V_MAJOR-1).m4_eval(V_MINOR+1)],[0]) - ]) - -AT_CLEANUP |