Hook up the libvorbis self test code so it is run by automake's 'check'
authorRalph Giles <giles@xiph.org>
Fri, 31 Aug 2007 03:16:30 +0000 (03:16 +0000)
committerRalph Giles <giles@xiph.org>
Fri, 31 Aug 2007 03:16:30 +0000 (03:16 +0000)
target. This only enables the sharedbook.c self test, as the codebook.c
self test has bit rotted.

Unfortunately the doc stuff scrolls the results off the screen, but
given the trouble we've had with the doc build in the past, I'm
loath to place it before the code.

svn path=/trunk/vorbis/; revision=13666

Makefile.am
configure.in
lib/Makefile.am

index 0ec16b5..4005171 100644 (file)
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = 1.6 foreign dist-zip dist-bzip2
 
-SUBDIRS = lib include doc examples vq
+SUBDIRS = include vq lib examples doc
 
 m4datadir = $(datadir)/aclocal
 m4data_DATA = vorbis.m4
index 3f32a0a..f62f77b 100644 (file)
@@ -49,6 +49,7 @@ CFLAGS="$cflags_save"
 AC_C_INLINE
 
 AM_PROG_LIBTOOL
+AM_PROG_CC_C_O
 
 dnl docbook xml transform and processing tools
 AC_ARG_ENABLE(docs,
index 8929e07..b666817 100644 (file)
@@ -37,6 +37,23 @@ psytune_LDADD = libvorbis.la
 
 EXTRA_DIST = lookups.pl 
 
+# build and run the self tests on 'make check'
+
+#vorbis_selftests = test_codebook test_sharedbook
+vorbis_selftests = test_sharedbook
+
+TESTS = $(vorbis_selftests)
+noinst_PROGRAMS = $(vorbis_selftests)
+
+test_codebook_SOURCES = codebook.c
+test_codebook_CFLAGS = -D_V_SELFTEST
+
+test_sharedbook_SOURCES = sharedbook.c
+test_sharedbook_CFLAGS = -D_V_SELFTEST
+test_sharedbook_LDADD = @VORBIS_LIBS@
+
+# recurse for alternate targets
+
 debug:
        $(MAKE) all CFLAGS="@DEBUG@"