source: branches/0.10-stable/test/Makefile.am @ 2925

Last change on this file since 2925 was 2925, checked in by Peter, 10 years ago

let bam files depend on Makefile to 1) regenerate bam files when rules have changed 2) regenerate if HAVE_SAMTOOLS conditional has changed.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.5 KB
Line 
1## Process this file with automake to produce Makefile.in
2##
3## $Id: Makefile.am 2925 2012-12-19 21:41:43Z peter $
4
5# Copyright (C) 2003 Daniel Dalevi, Jari Häkkinen
6# Copyright (C) 2004 Jari Häkkinen, Peter Johansson, Cecilia Ritz
7# Copyright (C) 2005 Jari Häkkinen, Peter Johansson
8# Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér
9# Copyright (C) 2009, 2010, 2011, 2012 Peter Johansson
10#
11# This file is part of the yat library, http://dev.thep.lu.se/yat
12#
13# The yat library is free software; you can redistribute it
14# and/or modify it under the terms of the GNU General Public License as
15# published by the Free Software Foundation; either version 3 of the
16# License, or (at your option) any later version.
17#
18# The yat library is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21# General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with yat. If not, see <http://www.gnu.org/licenses/>.
25
26## we use suffix .cc for all source
27AM_DEFAULT_SOURCE_EXT = .cc
28
29noinst_HEADERS = test/Suite.h
30
31check_LTLIBRARIES = test/libyattest.la
32
33check_SCRIPTS = test/common_defs.sh
34
35EXTRA_PROGRAMS = test/alignment.test \
36  test/alignment2.test \
37  test/averager.test \
38  test/averager1.test \
39  test/averager3.test \
40  test/averager4.test \
41  test/bam_pair_analyse test/bam_iterator test/bam_region_iterator \
42  test/codon.test test/commandline.test \
43  test/concept.test \
44  test/consensus_inputranker.test test/data_lookup_1d.test  \
45  test/data_weight.test test/data_weight_proxy.test \
46  test/deleter.test \
47  test/distance.test \
48  test/dna.test test/ensemble.test test/feature_selection.test \
49  test/fileutil.test \
50  test/fisher.test test/genomic_position.test test/getline_iterator.test \
51  test/gff.test test/help.test test/histogram.test \
52  test/igp.test test/index.test test/inputranker.test test/interpolation.test \
53  test/iterator.test test/kendall.test test/kernel_lookup.test \
54  test/kernel_pca.test test/kernel.test \
55  test/knn.test test/kolmogorov_smirnov.test test/large_file.test \
56  test/matrix_lookup.test \
57  test/matrix_lookup_weighted.test test/matrix.test \
58  test/matrix_weighted.test test/merge.test test/nbc.test \
59  test/ncc.test test/nni.test test/normalization.test test/pca.test \
60  test/range.test test/regression.test test/rnd.test \
61  test/rng-mt.test \
62  test/roc.test \
63  test/score.test test/segment.test test/smart_ptr.test   \
64  test/smoother.test test/spearman.test \
65  test/split.test test/statistics.test test/stream_redirect.test \
66  test/subset_generator.test test/svd.test test/svm.test \
67  test/svm_multi_class.test test/target.test \
68  test/ttest.test test/tukey.test \
69  test/utility.test test/vector.test test/version.test test/view.test
70
71TESTS = $(EXTRA_PROGRAMS)
72CLEANFILES += $(EXTRA_PROGRAMS)
73
74# tests not passing through yet
75XFAIL_TESTS =
76
77DISTRIBUTED_TESTS = \
78test/cmd_test.sh \
79test/doxygen_test.sh \
80test/help_test.sh \
81test/static_test.sh \
82test/yat_config_test.sh \
83test/yat_config_cblas_test.sh \
84test/yat_cpp_add_flag_test.sh \
85test/yat_cxx_add_flag_test.sh \
86test/yat_ld_add_flag_test.sh \
87test/yat_have_svn_wc_test.sh \
88test/yat_lt_link_ifelse_test.sh \
89test/yat_msg_error_test.sh \
90test/yat_msg_error_test2.sh \
91test/yat_m4_test.sh \
92test/yat_m4_test2.sh \
93test/yat_prog_move_if_change_test.sh \
94test/yat_revision_header_test.sh \
95test/yat_svn_release_year_test.sh \
96test/yat_svn_revision_test.sh
97
98TESTS += $(DISTRIBUTED_TESTS)
99EXTRA_DIST += $(DISTRIBUTED_TESTS)
100
101TEST_EXTENSIONS = .sh .test
102
103LDADD = yat/libyat.la test/libyattest.la $(YAT_LIBS)
104
105#test_large_file_test_LDADD = test/libyattest.la
106
107test_libyattest_la_LIBADD = yat/libyat.la
108test_libyattest_la_SOURCES = test/Suite.cc
109
110lazycheck:; $(MAKE) $(AM_MAKEFLAGS) check RECHECK_LOGS=
111
112# dependencies for lazycheck
113test/cmd_test.log: test/help.test test/common_defs.sh
114test/help_test.log: test/help.test test/common_defs.sh
115test/static_test.log: $(srcdir)/m4/yat.m4 test/common_defs.sh
116test/yat_config_test.log: build_support/yat-config \
117  build_support/for_installation/yat-config test/common_defs.sh
118test/yat_config_cblas_test.log: build_support/yat-config test/common_defs.sh
119test/yat_cpp_add_flag_test.log: $(srcdir)/m4/yat_add_flag.m4 \
120  $(srcdir)/m4/ax_append_flag.m4 \
121  $(srcdir)/m4/ax_check_preproc_flag.m4 \
122  test/common_defs.sh
123test/yat_cxx_add_flag_test.log: $(top_srcdir)/m4/yat_add_flag.m4 \
124  $(top_srcdir)/m4/ax_append_compile_flags.m4 \
125  $(top_srcdir)/m4/ax_append_flag.m4 \
126  $(top_srcdir)/m4/ax_check_compile_flag.m4 \
127  test/common_defs.sh
128test/yat_have_svn_wc_test.log: $(srcdir)/m4/yat_am_macros.m4 test/common_defs.sh
129test/yat_ld_add_flag_test.log: $(top_srcdir)/m4/yat_add_flag.m4 \
130  $(top_srcdir)/m4/ax_append_flag.m4 \
131  $(top_srcdir)/m4/ax_append_link_flags.m4 \
132  $(top_srcdir)/m4/ax_check_link_flag.m4 \
133  test/common_defs.sh
134test/yat_lt_link_ifelse_test.log: $(top_srcdir)/m4/yat_lt_link_ifelse.m4 \
135  $(top_srcdir)/m4/yat.m4 test/common_defs.sh \
136  $(top_builddir)/build_support/yat-config
137test/yat_m4_test.log:$(top_srcdir)/m4/yat.m4 test/common_defs.sh \
138  $(top_builddir)/build_support/yat-config
139test/yat_m4_test2.log:$(top_srcdir)/m4/yat.m4 test/common_defs.sh
140test/yat_msg_error_test.log:$(srcdir)/m4/yat_msg_error.m4 test/common_defs.sh
141test/yat_msg_error_test2.log:$(srcdir)/m4/yat_msg_error.m4 test/common_defs.sh
142test/yat_prog_move_if_change_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
143  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
144  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
145  $(top_srcdir)/m4/ax_file_escapes.m4 \
146  test/common_defs.sh
147test/yat_revision_header_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
148  test/common_defs.sh \
149  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
150  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
151  $(top_srcdir)/m4/ax_file_escapes.m4
152test/yat_svn_release_year_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
153  test/common_defs.sh \
154  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
155  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
156  $(top_srcdir)/m4/ax_file_escapes.m4
157test/yat_svn_revision_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
158  test/common_defs.sh \
159  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
160  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
161  $(top_srcdir)/m4/ax_file_escapes.m4
162
163if DX_ENABLE_HTML
164test/doxygen_test.log: doc/$(DX_HTML_OUTPUT)/index.html
165endif
166
167# yat-hello is an example of a tiny package that uses yat
168noinst_DATA = $(srcdir)/test/yat-hello-1.0.tar.gz
169
170# Directory yat-hello contains what a developer would check out
171# from a VCS, i.e., no files generated by autotools.
172yat_hello_sources  =
173yat_hello_sources += $(srcdir)/test/yat-hello/configure.ac
174yat_hello_sources += $(srcdir)/test/yat-hello/Makefile.am
175yat_hello_sources += $(srcdir)/test/yat-hello/hello.cc
176
177EXTRA_DIST += $(yat_hello_sources)
178
179yat_hello_tmp_files =
180yat_hello_tmp_files += Makefile.in
181yat_hello_tmp_files += autom4te.cache
182yat_hello_tmp_files += aclocal.m4
183yat_hello_tmp_files += build-aux
184yat_hello_tmp_files += configure
185yat_hello_tmp_files += m4
186
187
188yat_hello_deps = $(yat_hello_sources)
189yat_hello_deps += $(top_srcdir)/m4/yat.m4
190## We depend on version.m4 so tarball is updated at every release (at least)
191yat_hello_deps += $(top_srcdir)/m4/version.m4
192
193EXTRA_DIST += $(srcdir)/test/yat-hello-1.0.tar.gz
194
195$(srcdir)/test/yat-hello-1.0.tar.gz: $(yat_hello_deps)
196  $(AM_V_GEN)cd $(srcdir)/test/yat-hello \
197  && $(MKDIR_P) m4 \
198  && cp $(abs_top_srcdir)/m4/yat.m4 m4/ \
199  && autoreconf -if $(yat_dev_null) \
200  && ./configure --without-yat $(yat_dev_null) \
201  && $(MAKE) $(AM_MAKEFLAGS) dist $(yat_dev_null) \
202  && $(MAKE) $(AM_MAKEFLAGS) distclean $(yat_dev_null) \
203  && mv yat-hello-1.0.tar.gz .. \
204  && rm -rf $(yat_hello_tmp_files)
205
206INSTALL_CHECK_TARGETS += yat-hello-check
207
208yat-hello-check: $(srcdir)/test/yat-hello-1.0.tar.gz
209  GZIP=$(GZIP_ENV) gzip -dc $(srcdir)/test/yat-hello-1.0.tar.gz | $(am__untar)\
210  && cd yat-hello-1.0 \
211  && ./configure --with-yat=$(bindir) \
212  && $(MAKE) $(AM_MAKEFLAGS) all \
213  && ./hello \
214  && cd .. \
215  && rm -rf yat-hello-1.0
216
217
218## test data
219EXTRA_DIST += \
220test/data/foo.sam \
221test/data/isoform.peaks \
222test/data/knni_matrix.data \
223test/data/knni_result.data \
224test/data/knni_weight.data \
225test/data/nm_alpha_linear_matlab.txt \
226test/data/nm_data_centralized.txt \
227test/data/nm_kernel.txt \
228test/data/nm_kernel2.txt \
229test/data/nm_kernel_gaussian.txt \
230test/data/nm_target_bin.txt \
231test/data/normalization_test.data \
232test/data/rank_data.txt \
233test/data/rank_target.txt \
234test/data/regression_gauss.data \
235test/data/small.gff2 \
236test/data/small.gff3 \
237test/data/sorlie_centroid_classes.txt \
238test/data/sorlie_centroid_data.txt  \
239test/data/sorlie_centroid_predictions.txt \
240test/data/sorlie_centroids.txt \
241test/data/vector1.data  \
242test/data/vector2.data \
243test/data/vector3.data \
244test/data/vector4.data \
245test/data/vector5.data \
246test/data/vector6.data  \
247test/data/vector7.data \
248test/data/wenni_result.data \
249test/data/wenni_weight.data
250
251CLEANFILES += test/data/.dirstamp
252CLEANFILES += test/data/foo.bam
253CLEANFILES += test/data/foo.supported.bam
254CLEANFILES += test/data/foo.supported.bam.bai
255
256check_DATA  = test/data/foo.sorted.bam
257check_DATA += test/data/foo.sorted.bam.bai
258
259test/data/.dirstamp:
260  @$(MKDIR_P) test/data
261  @: > $@
262
263if HAVE_SAMTOOLS
264test/data/foo.bam: test/data/foo.sam test/data/.dirstamp Makefile
265  $(SAMTOOLS) view -Sb $(srcdir)/test/data/foo.sam > $@-t && mv $@-t $@
266
267test/data/foo.sorted.bam: test/data/foo.bam
268  $(SAMTOOLS) sort test/data/foo.bam test/data/foo.sorted
269
270test/data/foo.sorted.bam.bai: test/data/foo.sorted.bam
271  $(SAMTOOLS) index test/data/foo.sorted.bam
272else
273test/data/foo.sorted.bam:; : > $@
274test/data/foo.sorted.bam.bai:; : > $@
275endif
Note: See TracBrowser for help on using the repository browser.