annotate src/libsndfile-1.0.27/Scripts/build-test-tarball.mk.in @ 84:08ae793730bd

Add null config files
author Chris Cannam
date Mon, 02 Mar 2020 14:03:47 +0000
parents 1df64224f5ac
children
rev   line source
Chris@40 1 #!/usr/bin/make -f
Chris@40 2
Chris@40 3 # This is probably only going to work with GNU Make.
Chris@40 4 # This in a separate file instead of in Makefile.am because Automake complains
Chris@40 5 # about the GNU Make-isms.
Chris@40 6
Chris@40 7 EXEEXT = @EXEEXT@
Chris@40 8
Chris@40 9 PACKAGE_VERSION = @PACKAGE_VERSION@
Chris@40 10
Chris@40 11 HOST_TRIPLET = @HOST_TRIPLET@
Chris@40 12
Chris@40 13 SRC_BINDIR = @SRC_BINDIR@
Chris@40 14 TEST_BINDIR = @TEST_BINDIR@
Chris@40 15
Chris@40 16 LIBRARY := $(SRC_BINDIR)libsndfile.so.$(LIB_VERSION)
Chris@40 17
Chris@40 18 LIB_VERSION := $(shell echo $(PACKAGE_VERSION) | sed -e 's/[a-z].*//')
Chris@40 19
Chris@40 20 TESTNAME = libsndfile-testsuite-$(HOST_TRIPLET)-$(PACKAGE_VERSION)
Chris@40 21
Chris@40 22 TARBALL = $(TESTNAME).tar.gz
Chris@40 23
Chris@40 24 # Find the test programs by grepping the script for the programs it executes.
Chris@40 25 testprogs := $(shell grep '^\./' tests/test_wrapper.sh | sed -e "s|./||" -e "s/ .*//" | sort | uniq)
Chris@40 26 # Also add the programs not found by the above.
Chris@40 27 testprogs += sfversion@EXEEXT@ stdin_test@EXEEXT@ stdout_test@EXEEXT@ cpp_test@EXEEXT@ win32_test@EXEEXT@
Chris@40 28
Chris@40 29 # Find the single test program in src/ .
Chris@40 30 srcprogs := $(shell if test -x src/.libs/test_main$(EXEEXT) ; then echo "src/.libs/test_main$(EXEEXT)" ; else echo "src/test_main$(EXEEXT)" ; fi)
Chris@40 31
Chris@40 32 libfiles := $(shell if test ! -z $(EXEEXT) ; then echo "src/libsndfile-1.def src/.libs/libsndfile-1.dll" ; elif test -f $(LIBRARY) ; then echo $(LIBRARY) ; fi ; fi)
Chris@40 33
Chris@40 34 testbins := $(addprefix $(TEST_BINDIR),$(subst @EXEEXT@,$(EXEEXT),$(testprogs))) $(libfiles) $(srcprogs)
Chris@40 35
Chris@40 36
Chris@40 37 all : $(TARBALL)
Chris@40 38
Chris@40 39 clean :
Chris@40 40 rm -rf $(TARBALL) $(TESTNAME)/
Chris@40 41
Chris@40 42 check : $(TESTNAME)/test_wrapper.sh
Chris@40 43 (cd ./$(TESTNAME)/ && ./test_wrapper.sh)
Chris@40 44
Chris@40 45 $(TARBALL) : $(TESTNAME)/test_wrapper.sh
Chris@40 46 tar zcf $@ $(TESTNAME)
Chris@40 47 rm -rf $(TESTNAME)
Chris@40 48 @echo
Chris@40 49 @echo "Created : $(TARBALL)"
Chris@40 50 @echo
Chris@40 51
Chris@40 52 $(TESTNAME)/test_wrapper.sh : $(testbins) tests/test_wrapper.sh tests/pedantic-header-test.sh
Chris@40 53 rm -rf $(TESTNAME)
Chris@40 54 mkdir -p $(TESTNAME)/tests/
Chris@40 55 cp $(testbins) $(TESTNAME)/tests/
Chris@40 56 cp tests/test_wrapper.sh $(TESTNAME)/
Chris@40 57 cp tests/pedantic-header-test.sh $(TESTNAME)/tests/
Chris@40 58 chmod u+x $@
Chris@40 59
Chris@40 60 tests/test_wrapper.sh : tests/test_wrapper.sh.in
Chris@40 61 (cd tests/ ; make $@)