aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-01-31 20:32:31 +0200
committerArnold D. Robbins <arnold@skeeve.com>2013-01-31 20:32:31 +0200
commit1ff958d4fcd4d458c433c416fb119cc20e5eeba8 (patch)
tree05de6c4a99244dcc0a2369cd39accf9031517c17
parent2630adaa89d50ee7c712e39886ecb69d36426cb5 (diff)
downloadegawk-1ff958d4fcd4d458c433c416fb119cc20e5eeba8.tar.gz
egawk-1ff958d4fcd4d458c433c416fb119cc20e5eeba8.tar.bz2
egawk-1ff958d4fcd4d458c433c416fb119cc20e5eeba8.zip
Add API to --version output. Use it for shlib tests.
-rw-r--r--ChangeLog2
-rw-r--r--main.c3
-rw-r--r--test/ChangeLog2
-rw-r--r--test/Makefile.am6
-rw-r--r--test/Makefile.in6
5 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 233a7949..d00b1fb8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
* dfa.c: Include "dfa.h" which includes regex.h after limits.h
so that RE_DUP_MAX gets the correct value. Especially needed on
OpenVMS. Thanks to Anders Wallin.
+ * main.c (version): Print out API version numbers if DYNAMIC.
+ Helpful also for knowing if to run the shlib tests.
2013-01-31 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/main.c b/main.c
index 7d4458ba..c3adc9f5 100644
--- a/main.c
+++ b/main.c
@@ -1426,6 +1426,9 @@ static void
version()
{
printf("%s", version_string);
+#ifdef DYNAMIC
+ printf(", API: %d.%d", GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION);
+#endif
#ifdef HAVE_MPFR
printf(" (GNU MPFR %s, GNU MP %s)", mpfr_get_version(), gmp_version);
#endif
diff --git a/test/ChangeLog b/test/ChangeLog
index 9d612dcd..ba491f3e 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -2,6 +2,8 @@
* Makefile.am: Move functab4 into shlib tests, since it uses
@load. Thanks to Anders Wallin for the report.
+ (shlib-tests): Check --version output for "API" and run tests
+ if there.
2013-01-31 Andrew J. Schorr <aschorr@telemetry-investments.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 5edb499f..c45be575 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1059,9 +1059,9 @@ mpfr-tests:
fi
shlib-tests:
- @if grep 'DYNAMIC 1' $(top_builddir)/config.h > /dev/null ; then \
- $(MAKE) shlib-real-tests ; \
- else echo shlib tests not supported on this system ; \
+ @if $(AWK) --version | $(AWK) '/API/ { exit 1 }' ; then \
+ echo shlib tests not supported on this system ; \
+ else $(MAKE) shlib-real-tests ; \
fi
shlib-real-tests: $(SHLIB_TESTS)
diff --git a/test/Makefile.in b/test/Makefile.in
index c182952a..e1a44a5a 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1442,9 +1442,9 @@ mpfr-tests:
fi
shlib-tests:
- @if grep 'DYNAMIC 1' $(top_builddir)/config.h > /dev/null ; then \
- $(MAKE) shlib-real-tests ; \
- else echo shlib tests not supported on this system ; \
+ @if $(AWK) --version | $(AWK) '/API/ { exit 1 }' ; then \
+ echo shlib tests not supported on this system ; \
+ else $(MAKE) shlib-real-tests ; \
fi
shlib-real-tests: $(SHLIB_TESTS)