1 | ## Process this file with automake to produce Makefile.in |
---|
2 | ## |
---|
3 | |
---|
4 | # $Id: Makefile.am 3219 2014-05-06 03:28:46Z peter $ |
---|
5 | # |
---|
6 | # Copyright (C) 2003 Daniel Dalevi, Jari Häkkinen |
---|
7 | # Copyright (C) 2005 Peter Johansson |
---|
8 | # Copyright (C) 2006 Jari Häkkinen |
---|
9 | # Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson |
---|
10 | # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Peter Johansson |
---|
11 | # |
---|
12 | # This file is part of the yat library, http://dev.thep.lu.se/yat |
---|
13 | # |
---|
14 | # The yat library is free software; you can redistribute it and/or |
---|
15 | # modify it under the terms of the GNU General Public License as |
---|
16 | # published by the Free Software Foundation; either version 3 of the |
---|
17 | # License, or (at your option) any later version. |
---|
18 | # |
---|
19 | # The yat library is distributed in the hope that it will be useful, |
---|
20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
22 | # General Public License for more details. |
---|
23 | # |
---|
24 | # You should have received a copy of the GNU General Public License |
---|
25 | # along with yat. If not, see <http://www.gnu.org/licenses/>. |
---|
26 | |
---|
27 | # -I arg should be the same as arg in AC_CONFIG_MACRO_DIR in configure.ac |
---|
28 | ACLOCAL_AMFLAGS = -I m4 |
---|
29 | |
---|
30 | CLEANFILES = |
---|
31 | DOXYGEN_INPUT = |
---|
32 | EXTRA_DIST = |
---|
33 | MOSTLYCLEANFILES = |
---|
34 | ## append targets to this variable for tests included in 'make installcheck' |
---|
35 | INSTALL_CHECK_TARGETS = |
---|
36 | |
---|
37 | FORCE: |
---|
38 | |
---|
39 | ## variable to used to switch between verbose output and silence |
---|
40 | ## yat_dev_null expands to empty string in verbose mode and to > |
---|
41 | ## /dev/null in silent mode, so 'echo hello $(yat_dev_null)' will |
---|
42 | ## display hello in verbose mode and being silent in silent mode. |
---|
43 | yat_dev_null = $(yat_dev_null_$(V)) |
---|
44 | yat_dev_null_ = $(yat_dev_null_$(AM_DEFAULT_VERBOSITY)) |
---|
45 | yat_dev_null_0 = > /dev/null |
---|
46 | |
---|
47 | include build_support/Makefile.am |
---|
48 | ## yat/Makefile.am contains DOXYGEN definitions, so needs to be |
---|
49 | ## included before doc/Makefile |
---|
50 | include yat/Makefile.am |
---|
51 | include doc/Makefile.am |
---|
52 | include m4/Makefile.am |
---|
53 | include test/Makefile.am |
---|
54 | |
---|
55 | EXTRA_DIST += doc/Makefile |
---|
56 | EXTRA_DIST += test/Makefile |
---|
57 | EXTRA_DIST += yat/random/Makefile |
---|
58 | EXTRA_DIST += yat/regression/Makefile |
---|
59 | EXTRA_DIST += yat/normalizer/Makefile |
---|
60 | EXTRA_DIST += yat/classifier/Makefile |
---|
61 | EXTRA_DIST += yat/omic/Makefile |
---|
62 | EXTRA_DIST += yat/statistics/Makefile |
---|
63 | EXTRA_DIST += yat/utility/Makefile |
---|
64 | EXTRA_DIST += yat/Makefile |
---|
65 | |
---|
66 | clean-local: |
---|
67 | rm -rf doc/$(DX_HTML_OUTPUT) test/yathello test/testSubDir test/lib |
---|
68 | |
---|
69 | installcheck-local: $(INSTALL_CHECK_TARGETS) |
---|
70 | |
---|
71 | .PHONY: doc maintainer-check news-check svn-check svn-clean release |
---|
72 | |
---|
73 | # like the normal install target, but does not update header files |
---|
74 | # (and their time stamps) if the content did not change. |
---|
75 | install-modified: |
---|
76 | $(MAKE) install $(AM_MAKEFLAGS) INSTALL_HEADER="$(install_sh_DATA) -C" |
---|
77 | |
---|
78 | ############################################################### |
---|
79 | ## |
---|
80 | ## Some targets useful for the maintainer |
---|
81 | ## |
---|
82 | MAINTAINER_CHECK_LOCAL = maintainer-check-local |
---|
83 | RELEASE_LOCAL = ltversion-check |
---|
84 | |
---|
85 | .PHONY: maintainer-check-local ltversion-check |
---|
86 | |
---|
87 | ltversion-check: |
---|
88 | @case `sed 200q $(srcdir)/m4/version.m4` in \ |
---|
89 | *yat-$(VERSION)*$(YAT_LT_VERSION)*);; \ |
---|
90 | *) \ |
---|
91 | echo "version.m4: YAT_LT_VERSION not updated;" 1>&2;\ |
---|
92 | echo " expected to find 'yat-$(VERSION) $(YAT_LT_VERSION)'" 1>&2;\ |
---|
93 | exit 1;; \ |
---|
94 | esac |
---|
95 | |
---|
96 | maintainer-check-local: |
---|
97 | $(MAKE) $(AM_MAKEFLAGS) syntax-check |
---|
98 | $(MAKE) $(AM_MAKEFLAGS) mc_installcheck |
---|
99 | $(MAKE) $(AM_MAKEFLAGS) mc_without_samtools |
---|
100 | $(MAKE) $(AM_MAKEFLAGS) yat-pc-check |
---|
101 | |
---|
102 | mc_installcheck: |
---|
103 | mkdir _inst |
---|
104 | @mcl_install=`cd _inst && pwd` \ |
---|
105 | && $(MAKE) $(AM_MAKEFLAGS) clean \ |
---|
106 | && $(MAKE) $(AM_MAKEFLAGS) prefix=$$mcl_install \ |
---|
107 | && $(MAKE) $(AM_MAKEFLAGS) prefix=$$mcl_install doc \ |
---|
108 | && $(MAKE) $(AM_MAKEFLAGS) prefix=$$mcl_install install \ |
---|
109 | && $(MAKE) $(AM_MAKEFLAGS) prefix=$$mcl_install installcheck |
---|
110 | |
---|
111 | # check that yat.pc is correctly generated with different combinations |
---|
112 | # of ./configure; make. This target is typically used within |
---|
113 | # mainatiner-check; if used outside maintainer-check, please note that |
---|
114 | # the target calls configure possibly with other arguments, so it's |
---|
115 | # probably a good a idea to re-configure afterwards. |
---|
116 | yat-pc-check: |
---|
117 | $(SHELL) $(srcdir)/configure $(DISTCHECK_CONFIGURE_FLAGS) \ |
---|
118 | && rm -f build_support/yat.pc && $(MAKE) $(AM_MAKEFLAGS) \ |
---|
119 | && $(GREP) '^prefix=/usr/local' build_support/yat.pc \ |
---|
120 | && $(GREP) '^exec_prefix=$${prefix}' build_support/yat.pc \ |
---|
121 | && $(GREP) '^libdir=$${exec_prefix}/lib' build_support/yat.pc \ |
---|
122 | && $(GREP) '^includedir=$${prefix}/include' build_support/yat.pc \ |
---|
123 | && rm -f build_support/yat.pc && $(MAKE) $(AM_MAKEFLAGS) prefix=foo \ |
---|
124 | && $(GREP) '^prefix=foo' build_support/yat.pc \ |
---|
125 | && $(GREP) '^exec_prefix=$${prefix}' build_support/yat.pc \ |
---|
126 | && $(GREP) '^libdir=$${exec_prefix}/lib' build_support/yat.pc \ |
---|
127 | && $(GREP) '^includedir=$${prefix}/include' build_support/yat.pc \ |
---|
128 | && rm -f build_support/yat.pc \ |
---|
129 | && $(MAKE) $(AM_MAKEFLAGS) prefix=foo exec_prefix=bar \ |
---|
130 | && $(GREP) '^prefix=foo' build_support/yat.pc \ |
---|
131 | && $(GREP) '^exec_prefix=bar' build_support/yat.pc \ |
---|
132 | && $(GREP) '^libdir=$${exec_prefix}/lib' build_support/yat.pc \ |
---|
133 | && $(GREP) '^includedir=$${prefix}/include' build_support/yat.pc \ |
---|
134 | && rm -f build_support/yat.pc \ |
---|
135 | && $(MAKE) $(AM_MAKEFLAGS) prefix=foo exec_prefix=bar libdir=baz includedir=quz \ |
---|
136 | && $(GREP) '^prefix=foo' build_support/yat.pc \ |
---|
137 | && $(GREP) '^exec_prefix=bar' build_support/yat.pc \ |
---|
138 | && $(GREP) '^libdir=baz' build_support/yat.pc \ |
---|
139 | && $(GREP) '^includedir=quz' build_support/yat.pc \ |
---|
140 | && $(SHELL) $(srcdir)/configure $(DISTCHECK_CONFIGURE_FLAGS) exec_prefix=/t \ |
---|
141 | && rm -f build_support/yat.pc && $(MAKE) $(AM_MAKEFLAGS) \ |
---|
142 | && $(GREP) '^prefix=/usr/local' build_support/yat.pc \ |
---|
143 | && $(GREP) '^exec_prefix=/t' build_support/yat.pc \ |
---|
144 | && $(GREP) '^libdir=$${exec_prefix}/lib' build_support/yat.pc \ |
---|
145 | && $(GREP) '^includedir=$${prefix}/include' build_support/yat.pc \ |
---|
146 | && rm -f build_support/yat.pc && $(MAKE) $(AM_MAKEFLAGS) prefix=foo \ |
---|
147 | && $(GREP) '^prefix=foo' build_support/yat.pc \ |
---|
148 | && $(GREP) '^exec_prefix=/t' build_support/yat.pc \ |
---|
149 | && $(GREP) '^libdir=$${exec_prefix}/lib' build_support/yat.pc \ |
---|
150 | && $(GREP) '^includedir=$${prefix}/include' build_support/yat.pc \ |
---|
151 | && rm -f build_support/yat.pc \ |
---|
152 | && $(MAKE) $(AM_MAKEFLAGS) prefix=foo exec_prefix=bar \ |
---|
153 | && $(GREP) '^prefix=foo' build_support/yat.pc \ |
---|
154 | && $(GREP) '^exec_prefix=bar' build_support/yat.pc \ |
---|
155 | && $(GREP) '^libdir=$${exec_prefix}/lib' build_support/yat.pc \ |
---|
156 | && $(GREP) '^includedir=$${prefix}/include' build_support/yat.pc \ |
---|
157 | && rm -f build_support/yat.pc \ |
---|
158 | && $(MAKE) $(AM_MAKEFLAGS) prefix=foo exec_prefix=bar libdir=baz includedir=quz \ |
---|
159 | && $(GREP) '^prefix=foo' build_support/yat.pc \ |
---|
160 | && $(GREP) '^exec_prefix=bar' build_support/yat.pc \ |
---|
161 | && $(GREP) '^libdir=baz' build_support/yat.pc \ |
---|
162 | && $(GREP) '^includedir=quz' build_support/yat.pc |
---|
163 | |
---|
164 | SVN = svn |
---|
165 | SVNCOPYRIGHT = svncopyright |
---|
166 | SVNDIGEST_COPY_CACHE = svndigest-copy-cache |
---|
167 | SCP = scp |
---|
168 | |
---|
169 | copyright: |
---|
170 | $(SVNCOPYRIGHT) -v -r $(srcdir) |
---|
171 | |
---|
172 | ## FIXME perhaps incorporate this target into release |
---|
173 | release-tag-upload: |
---|
174 | $(MAKE) $(AM_MAKEFLAGS) release |
---|
175 | $(MAKE) $(AM_MAKEFLAGS) svn-tag |
---|
176 | $(MAKE) $(AM_MAKEFLAGS) announce.txt |
---|
177 | $(MAKE) $(AM_MAKEFLAGS) upload |
---|
178 | |
---|
179 | announce.txt: build_support/gen_announce.sh $(distdir).tar.gz.MD5 |
---|
180 | $(SHELL) build_support/gen_announce.sh > $@ |
---|
181 | |
---|
182 | sf_user = peter31042 |
---|
183 | |
---|
184 | upload: $(distdir).tar.gz $(distdir).tar.gz.MD5 |
---|
185 | $(SCP) $(distdir).tar.gz $(distdir).tar.gz.MD5 \ |
---|
186 | $(sf_user),libyat@frs.sourceforge.net:/home/frs/project/l/li/libyat/. |
---|
187 | |
---|
188 | STABLE_VERSION = $(YAT_MAJOR_VERSION).$(YAT_MINOR_VERSION) |
---|
189 | STABLE_BRANCH = ^/branches/$(STABLE_VERSION)-stable |
---|
190 | |
---|
191 | # create a tag from current stable branch; depends on check-version to |
---|
192 | # ensure that version is macro.minor.micro (no pre suffix), that wc is |
---|
193 | # pristine and updated. |
---|
194 | svn-tag: check-version check-svn-diff |
---|
195 | cd $(srcdir) && \ |
---|
196 | $(SVN) copy $(STABLE_BRANCH) ^/tags/$(VERSION) \ |
---|
197 | -m "tagging version $(VERSION)" |
---|
198 | |
---|
199 | # create a stable-branch from trunk |
---|
200 | svn-stable-branch: check-svn-diff all |
---|
201 | cd $(srcdir) && \ |
---|
202 | svn copy ^/trunk $(STABLE_BRANCH) \ |
---|
203 | -m "New stable branch $(STABLE_VERSION)" \ |
---|
204 | && svn co $(STABLE_BRANCH) ../yat-$(STABLE_VERSION).x \ |
---|
205 | && $(SVNDIGEST_COPY_CACHE) -v -r . -t ../yat-$(STABLE_VERSION).x |
---|
206 | |
---|
207 | include $(srcdir)/am/maintainer.am |
---|
208 | |
---|
209 | # run within maintainer-check |
---|
210 | # try ./configure --without-samtools; make; make check |
---|
211 | mc_without_samtools: |
---|
212 | @rm -rf _mc_without_samtools |
---|
213 | mkdir _mc_without_samtools |
---|
214 | cd _mc_without_samtools \ |
---|
215 | && ../$(srcdir)/configure $(DISTCHECK_CONFIGURE_FLAGS) --without-samtools \ |
---|
216 | && $(MAKE) $(AM_MAKEFLAGS) && $(MAKE) check $(AM_MAKEFLAGS) |
---|
217 | |
---|
218 | test_sources = $(EXTRA_PROGRAMS:.test=.cc) |
---|
219 | |
---|
220 | syntax-check: sc_config_h |
---|
221 | |
---|
222 | sc_config_h: |
---|
223 | @for f in $(yat_libyat_la_SOURCES) $(test_sources); do \ |
---|
224 | test -e $$f || f=$(srcdir)/$$f;\ |
---|
225 | grep '^#include' $$f | head -n 1 | grep '<config.h>' > /dev/null || \ |
---|
226 | { echo "missing '#include <config.h>' in $$f" >&2; exit 1; } \ |
---|
227 | done |
---|