Refactor generation of test-suite

It's more preferable to generate the testsuite when running 'make dist'
or 'make distcheck' instead of running it from the configure script.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
This commit is contained in:
David Seifert 2017-01-27 23:51:19 +01:00 committed by Erik de Castro Lopo
parent 0fd257e432
commit 1bfb5a908f
5 changed files with 27 additions and 58 deletions

View File

@ -34,20 +34,16 @@ m4datadir = $(datadir)/aclocal
test: check-recursive
# Target to make autogenerated files.
genfiles :
(cd src ; make genfiles)
(cd tests ; make genfiles)
checkprograms :
(cd src ; make libsndfile.la checkprograms)
(cd tests ; make checkprograms)
(cd src ; $(MAKE) libsndfile.la checkprograms)
(cd tests ; $(MAKE) checkprograms)
testprogs :
(cd src ; make testprogs)
(cd tests ; make testprogs)
(cd src ; $(MAKE) testprogs)
(cd tests ; $(MAKE) testprogs)
test-tarball : Scripts/build-test-tarball.mk
(cd src ; make all libsndfile.la checkprograms)
(cd tests ; make all checkprograms)
make -f Scripts/build-test-tarball.mk
(cd src ; $(MAKE) all libsndfile.la checkprograms)
(cd tests ; $(MAKE) all checkprograms)
$(MAKE) -f Scripts/build-test-tarball.mk

View File

@ -691,6 +691,3 @@ echo " Stack smash protection : .............. ${enable_stack_smash_protectio
# Remove symlink created by Scripts/android-configure.sh.
test -h gdbclient && rm -f gdbclient
(cd src && make genfiles)
(cd tests && make genfiles)

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright (C) 2008-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
#

View File

@ -12,7 +12,7 @@ noinst_LTLIBRARIES = GSM610/libgsm.la G72x/libg72x.la ALAC/libalac.la libcommon
SYMBOL_FILES = Symbols.gnu-binutils Symbols.darwin libsndfile-1.def Symbols.os2 Symbols.static
EXTRA_DIST = sndfile.h.in config.h.in test_endswap.tpl test_endswap.def \
EXTRA_DIST = sndfile.h.in config.h.in test_endswap.c test_endswap.tpl test_endswap.def \
$(SYMBOL_FILES) create_symbols_file binheader_writef_check.py \
GSM610/README GSM610/COPYRIGHT GSM610/ChangeLog \
G72x/README G72x/README.original G72x/ChangeLog \
@ -85,10 +85,10 @@ test_main_LDADD = libcommon.la
G72x_g72x_test_SOURCES = G72x/g72x_test.c
G72x_g72x_test_LDADD = G72x/libg72x.la
test_endswap.c: test_endswap.def test_endswap.tpl
(cd $(srcdir) && autogen --writable test_endswap.def)
SUFFIXES = .def .tpl
genfiles : $(SYMBOL_FILES) test_endswap.c
.def.c:
autogen --writable $<
check :
@if [ -x /usr/bin/python ]; then $(srcdir)/binheader_writef_check.py $(srcdir)/*.c ; fi

View File

@ -20,15 +20,16 @@ check_PROGRAMS = sfversion floating_point_test write_read_test \
noinst_HEADERS = dft_cmp.h utils.h generate.h
autogen_sources = write_read_test.tpl write_read_test.def \
pcm_test.tpl pcm_test.def \
header_test.tpl header_test.def \
utils.tpl utils.def \
scale_clip_test.tpl scale_clip_test.def \
pipe_test.tpl pipe_test.def \
rdwr_test.tpl rdwr_test.def \
floating_point_test.tpl floating_point_test.def \
benchmark.tpl benchmark.def
autogen_sources = \
write_read_test.c write_read_test.tpl write_read_test.def \
pcm_test.c pcm_test.tpl pcm_test.def \
header_test.c header_test.tpl header_test.def \
utils.c utils.tpl utils.def \
scale_clip_test.c scale_clip_test.tpl scale_clip_test.def \
pipe_test.c pipe_test.tpl pipe_test.def \
rdwr_test.c rdwr_test.tpl rdwr_test.def \
floating_point_test.c floating_point_test.tpl floating_point_test.def \
benchmark.c benchmark.tpl benchmark.def
EXTRA_DIST = $(autogen_sources)
@ -188,34 +189,9 @@ scale_clip_test_LDADD = $(top_builddir)/src/libsndfile.la
#===============================================================================
write_read_test.c: write_read_test.def write_read_test.tpl
(cd $(srcdir) && autogen --writable write_read_test.def)
pcm_test.c: pcm_test.def pcm_test.tpl
(cd $(srcdir) && autogen --writable pcm_test.def)
header_test.c: header_test.def header_test.tpl
(cd $(srcdir) && autogen --writable header_test.def)
utils.c utils.h : utils.def utils.tpl
(cd $(srcdir) && autogen --writable utils.def)
scale_clip_test.c: scale_clip_test.def scale_clip_test.tpl
(cd $(srcdir) && autogen --writable scale_clip_test.def)
pipe_test.c: pipe_test.def pipe_test.tpl
(cd $(srcdir) && autogen --writable pipe_test.def)
rdwr_test.c: rdwr_test.def rdwr_test.tpl
(cd $(srcdir) && autogen --writable rdwr_test.def)
floating_point_test.c: floating_point_test.def floating_point_test.tpl
(cd $(srcdir) && autogen --writable floating_point_test.def)
benchmark.c: benchmark.def benchmark.tpl
(cd $(srcdir) && autogen --writable benchmark.def)
genfiles : write_read_test.c pcm_test.c header_test.c utils.c \
scale_clip_test.c pipe_test.c floating_point_test.c rdwr_test.c \
benchmark.c
SUFFIXES = .def .tpl
.def.c:
autogen --writable $<
.def.h:
autogen --writable $<