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