summaryrefslogtreecommitdiffabout
path: root/am
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-05 11:09:48 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-05-05 11:39:29 (GMT)
commit6c3f6c1b02dd5f9ac343c713bdae4aa83bafc328 (patch) (side-by-side diff)
tree49bc8df1cff7157c711c63447c3e272ebc67cd4c /am
parenta60eb4b18345626a84e23784d77ca231812e1dff (diff)
downloadgrecs-6c3f6c1b02dd5f9ac343c713bdae4aa83bafc328.tar.gz
grecs-6c3f6c1b02dd5f9ac343c713bdae4aa83bafc328.tar.bz2
Improve node formatting. Add version comparasion functions.
* am/grecs.m4 (GRECS_SETUP): New option: shared. * doc/GRECS_SETUP.3: Document new options. * doc/grecs_format_locus.3: Update. * doc/grecs_format_node.3: Document new flags. * src/.gitignore: Update. * src/version.c: New file. * src/Make.am (GRECS_SRC): Add version.c (EXTRA_DIST): Update. * src/diag.c (default_print_diag): Flush stdout as per the docs. * src/format.c (grecs_format_locus): Don't print trailing semicolon. (grecs_format_value): Handle GRECS_NODE_FLAG_NOQUOTE flag. (grecs_format_node): Print delimiters when needed. * src/grecs.h (grecs_version_info): New struct. (grecs_version, grecs_version_cmp): New protos. (GRECS_NODE_FLAG_NOQUOTE): New flag. * tests/gcfver.c: New file. * tests/vercmp.at: New file. * tests/.gitignore: Update. * tests/Makefile.am: Define GRECS_VERCMP_AT in package.m4 (TESTSUITE_AT): Add vercmp.at (conditionally). (noinst_PROGRAMS): Add gcfver. * tests/testsuite.at: Conditionally include vercmp.at.
Diffstat (limited to 'am') (more/less context) (ignore whitespace changes)
-rw-r--r--am/grecs.m420
1 files changed, 16 insertions, 4 deletions
diff --git a/am/grecs.m4 b/am/grecs.m4
index 764ce46..e8d6915 100644
--- a/am/grecs.m4
+++ b/am/grecs.m4
@@ -147,20 +147,32 @@ AC_DEFUN([GRECS_SETUP],[
GRECS_BUILD_AUX="build-aux/getopt.m4"
])
_GRECS_IF_OPTION_SET([git2chg],[GRECS_BUILD_AUX="$GRECS_BUILD_AUX build-aux/git2chg.awk"])
+
+ # Make sure package versioning is compatible with vercmp.at:
+ s=`echo $PACKAGE_VERSION | sed 's/[0-9][0-9]*\.[0-9][0-9]*\(\.[0-9][0-9]\)\?\([^a-zA-Z_0-9].*\)\?//'`
+ if test -z "$s"; then
+ GRECS_VERCMP_AT=vercmp.at
+ fi
+
+ AC_SUBST([GRECS_VERCMP_AT])
AC_SUBST([GRECS_BUILD_AUX])
AC_SUBST([GRECS_INCLUDES])
AC_SUBST([GRECS_TESTDIR])
AC_SUBST([GRECS_LDADD])
AC_SUBST([GRECS_DOCDIR])
- _GRECS_IF_OPTION_SET([install],[
+ _GRECS_OPTION_SWITCH([install],[
LT_INIT
GRECS_LDADD='$(top_builddir)/m4_if([$1],,grecs,$1)/src/libgrecs.la'
GRECS_DOCDIR='doc'
AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/src/Makefile:m4_if([$1],,grecs,$1)/src/Make-inst.in
m4_if([$1],,grecs,$1)/doc/Makefile)
- ],[
+ ],[shared],[
+ LT_INIT
+ GRECS_LDADD='$(top_builddir)/m4_if([$1],,grecs,$1)/src/libgrecs.la'
+ AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/src/Makefile:m4_if([$1],,grecs,$1)/src/Make-shared.in)
+ ],[
GRECS_LDADD='$(top_builddir)/m4_if([$1],,grecs,$1)/src/libgrecs.a'
- AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/src/Makefile:m4_if([$1],,grecs,$1)/src/Make-noinst.in)
- ])
+ AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/src/Makefile:m4_if([$1],,grecs,$1)/src/Make-static.in)
+ ])
AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/Makefile)
])

Return to:

Send suggestions and report system problems to the System administrator.