mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / Makefile.am
blobd15cc8659ae579cfad4ca11b2e794ece3892c170
1 # Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; version 2 of the License.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 # GNU General Public License for more details.
11
12 # You should have received a copy of the GNU General Public License
13 # along with this program; if not, write to the Free Software
14 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
16 # Process this file with automake to create Makefile.in
18 AUTOMAKE_OPTIONS =      foreign
20 # These are built from source in the Docs directory
21 EXTRA_DIST =            INSTALL-SOURCE INSTALL-WIN-SOURCE \
22                         README COPYING CMakeLists.txt
24 SUBDIRS =               . include @docs_dirs@ @zlib_dir@ \
25                         @readline_topdir@ sql-common scripts \
26                         @sql_union_dirs@ unittest \
27                         @sql_server@ @man_dirs@ tests \
28                         netware @libmysqld_dirs@ \
29                         mysql-test support-files sql-bench @tools_dirs@ \
30                         win
32 DIST_SUBDIRS =          . include Docs zlib \
33                         cmd-line-utils sql-common scripts \
34                         strings mysys dbug extra regex libmysql libmysql_r client unittest storage plugin \
35                         vio sql man tests \
36                         netware libmysqld \
37                         mysql-test support-files sql-bench server-tools \
38                         win \
39                         BUILD
40 DISTCLEANFILES = ac_available_languages_fragment
42 # Create permission databases
43 init-db:                all
44         $(top_builddir)/scripts/mysql_install_db
46 bin-dist:               all
47         $(top_builddir)/scripts/make_binary_distribution @MAKE_BINARY_DISTRIBUTION_OPTIONS@
49 # Remove BK's "SCCS" subdirectories from source distribution
50 # Create initial database files for Windows installations and check them.
51 dist-hook:
52         rm -rf `find $(distdir) -type d -name SCCS -print`
53         mkdir -p $(distdir)/win
54         scripts/mysql_install_db --no-defaults --cross-bootstrap \
55                 --builddir=$(top_builddir) \
56                 --datadir=$(distdir)/win/data \
57                 --srcdir=$(top_srcdir)
58         storage/myisam/myisamchk --silent --fast $(distdir)/win/data/mysql/*.MYI
60 all-local:              @ABI_CHECK@     
62 tags:
63         support-files/build-tags
65 .PHONY: init-db bin-dist \
66   test    test-force    test-full    test-force-full    test-force-mem \
67   test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \
68   test-unit test-ps test-nr test-pr test-ns test-binlog-statement \
69   test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp \
70   test-ext-stress test-ext test-embedded test-reprepare \
71   test-fast test-fast-cursor test-fast-view test-fast-prepare \
72   test-full-qa
74 # Target 'test' will run the regression test suite using the built server.
76 # If you are running in a shared environment, users can avoid clashing
77 # port numbers by setting individual small numbers 1-100 to the
78 # environment variable MTR_BUILD_THREAD. The script "mysql-test-run"
79 # will then calculate the various port numbers it needs from this,
80 # making sure each user use different ports.
82 test-unit:
83         cd unittest && $(MAKE) test
85 test-ps:
86         cd mysql-test ; \
87             @PERL@ ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=mixed
89 test-nr:
90         cd mysql-test ; \
91             @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=row
93 test-pr:
94         cd mysql-test ; \
95             @PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol --mysqld=--binlog-format=row
97 test-ns:
98         cd mysql-test ; \
99             @PERL@ ./mysql-test-run.pl $(force) $(mem) --mysqld=--binlog-format=mixed
101 test-binlog-statement:
102         cd mysql-test ; \
103             @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement
105 # This code is duplicated in "test-bt", see the Changeset comment of 2007-Dec-07
106 test-embedded:
107         if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \
108           cd mysql-test ; MTR_BUILD_THREAD=auto \
109               @PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
110                   --embedded-server --skip-rpl --skip-ndbcluster ; \
111         else \
112           echo "no program found for 'embedded' tests - skipped testing" ; \
113         fi
115 test-reprepare:
116         cd mysql-test ; \
117             @PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol \
118                 --mysqld=--debug=+d,reprepare_each_statement
120 test:   test-unit test-ns test-pr
122 smoke:
123         cd mysql-test ; \
124             @PERL@ ./mysql-test-run.pl --do-test=s
126 test-full:      test test-nr test-ps
128 test-force:
129         $(MAKE) force=--force test
131 test-force-full:
132         $(MAKE) force=--force test-full
134 #used by autopush.pl to run memory based tests
135 test-force-mem:
136         $(MAKE) force=--force mem=--mem test
138 test-bt:
139         -cd mysql-test ; MTR_BUILD_THREAD=auto \
140             @PERL@ ./mysql-test-run.pl --comment=normal --force --timer \
141                 --skip-ndbcluster --report-features
142         -cd mysql-test ; MTR_BUILD_THREAD=auto \
143             @PERL@ ./mysql-test-run.pl  --comment=ps    --force --timer \
144                 --skip-ndbcluster --ps-protocol
145         -if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
146           cd mysql-test ; \
147             MTR_BUILD_THREAD=auto \
148               @PERL@ ./mysql-test-run.pl --comment=ndb+ps --force --timer \
149                   --ps-protocol --mysqld=--binlog-format=row --suite=ndb ; \
150             MTR_BUILD_THREAD=auto \
151               @PERL@ ./mysql-test-run.pl --comment=ndb --force --timer \
152                   --with-ndbcluster-only ; \
153         else \
154           echo "no program found for 'ndbcluster' tests - skipped testing" ; \
155         fi
156         -cd mysql-test ; MTR_BUILD_THREAD=auto \
157             @PERL@ ./mysql-test-run.pl --force --comment=funcs1+ps --ps-protocol --reorder --suite=funcs_1
158         -cd mysql-test ; MTR_BUILD_THREAD=auto \
159             @PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2
160         -cd mysql-test ; MTR_BUILD_THREAD=auto \
161             @PERL@ ./mysql-test-run.pl --force --comment=partitions --suite=parts
162         -cd mysql-test ; MTR_BUILD_THREAD=auto \
163             @PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
164         -cd mysql-test ; MTR_BUILD_THREAD=auto \
165             @PERL@ ./mysql-test-run.pl --force --comment=jp --suite=jp
166         -if [ -d mysql-test/suite/nist ] ; then \
167           cd mysql-test ; MTR_BUILD_THREAD=auto \
168               @PERL@ ./mysql-test-run.pl --comment=nist --force --suite=nist ; \
169         fi
170         -if [ -d mysql-test/suite/nist ] ; then \
171           cd mysql-test ; MTR_BUILD_THREAD=auto \
172               @PERL@ ./mysql-test-run.pl --comment=nist+ps --force --suite=nist --ps-protocol ; \
173         fi
174         -if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \
175           cd mysql-test ; MTR_BUILD_THREAD=auto \
176               @PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
177                   --embedded-server --skip-rpl --skip-ndbcluster ; \
178         else \
179           echo "no program found for 'embedded' tests - skipped testing" ; \
180         fi
182 test-bt-fast:
183         -cd mysql-test ; MTR_BUILD_THREAD=auto \
184             @PERL@ ./mysql-test-run.pl  --comment=ps    --force --timer \
185                 --skip-ndbcluster --ps-protocol --report-features
186         -if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
187           cd mysql-test ; \
188             MTR_BUILD_THREAD=auto \
189               @PERL@ ./mysql-test-run.pl --comment=ndb --force --timer \
190                   --with-ndbcluster-only ; \
191         else \
192           echo "no program found for 'ndbcluster' tests - skipped testing" ; \
193         fi
194         -cd mysql-test ; MTR_BUILD_THREAD=auto \
195             @PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
197 test-bt-debug:
198         -cd mysql-test ; MTR_BUILD_THREAD=auto \
199             @PERL@ ./mysql-test-run.pl --comment=debug  --force --timer \
200                 --skip-ndbcluster --skip-rpl --report-features
202 test-bt-debug-fast:
204 test-bt-debug-fast:
206 # Keep these for a while
207 test-pl:        test
208 test-full-pl:   test-full
209 test-force-pl:  test-force
210 test-force-pl-mem:  test-force-mem
211 test-force-full-pl: test-force-full
213 test-ext-funcs:
214         cd mysql-test ; \
215             @PERL@ ./mysql-test-run.pl --force --reorder --suite=funcs_1 ; \
216             @PERL@ ./mysql-test-run.pl --force --suite=funcs_2
218 test-ext-rpl:
219         cd mysql-test ; \
220             @PERL@ ./mysql-test-run.pl --force --suite=rpl
222 test-ext-partitions:
223         cd mysql-test ; \
224             @PERL@ ./mysql-test-run.pl --force --suite=parts
226 test-ext-jp:
227         cd mysql-test ; \
228             @PERL@ ./mysql-test-run.pl --force --suite=jp
230 test-ext-stress:
231         cd mysql-test ; \
232             @PERL@ ./mysql-test-run.pl --force --big-test --suite=stress
234 test-ext:       test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp test-ext-stress
236 test-fast:
237         cd mysql-test ; \
238             @PERL@ ./mysql-test-run.pl $(subset) --force --skip-ndb --skip-innodb --skip-im --skip-rpl ; \
239             @PERL@ ./mysql-test-run.pl $(subset) --force --suite=funcs_1 --do-test=myisam ; \
240             @PERL@ ./mysql-test-run.pl $(subset) --force --suite=stress --do-test=ddl_myisam 
242 test-fast-view:
243         $(MAKE) subset=--view-protocol test-fast
245 test-fast-cursor:
246         $(MAKE) subset=--cursor-protocol test-fast
248 test-fast-prepare:
249         $(MAKE) subset=--ps-protocol test-fast
251 test-full-qa:
252         $(MAKE) force=--force test-pr \
253             test-binlog-statement test-ext test-fast-view \
254                 test-fast-cursor test-unit
257 # Headers which need to be checked for abi/api compatibility.
258 # API_PREPROCESSOR_HEADER will be used until mysql_priv.h stablizes
259 # after which TEST_PREPROCESSOR_HEADER will be used.
262 API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin.h \
263                            $(top_srcdir)/include/mysql.h
265 TEST_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin.h \
266                             $(top_srcdir)/sql/mysql_priv.h \
267                             $(top_srcdir)/include/mysql.h
270 # Rules for checking that the abi/api has not changed.
272 # The following steps are followed in the do_abi_check rule below
274 # 1) Generate preprocessor output for the files that need to
275 #    be tested for abi/api changes. use -nostdinc to prevent
276 #    generation of preprocessor output for system headers. This
277 #    results in messages in stderr saying that these headers
278 #    were not found. Redirect the stderr output to /dev/null
279 #    to prevent seeing these messages.
280 # 2) sed the output to 
281 #    2.1) remove blank lines and lines that begin with "# "
282 #    2.2) When gcc -E is run on the Mac OS  and solaris sparc platforms it
283 #         introduces a line of output that shows up as a difference between
284 #         the .pp and .out files. Remove these OS specific preprocessor text
285 #         inserted by the preprocessor.
286 # 3) diff the generated file and the canons (.pp files already in
287 #    the repository).
288 # 4) delete the .out file that is generated.
290 # If the diff fails, the generated file is not removed. This will
291 # be useful for analysis of ABI differences (e.g. using a visual
292 # diff tool).
294 # A ABI change that causes a build to fail will always be accompanied
295 # by new canons (.out files). The .out files that are not removed will
296 # be replaced as the new .pp files.
298 # e.g. If include/mysql/plugin.h has an ABI change then this rule would
299 # leave a <build directory>/abi_check.out file.
301 # A developer with a justified API change will then do a
302 # mv <build directory>/abi_check.out include/mysql/plugin.pp 
303 # to replace the old canons with the new ones.
306 abi_check:      $(API_PREPROCESSOR_HEADER)
307         $(MAKE) abi_headers="$^" do_abi_check
309 abi_check_all:  $(TEST_PREPROCESSOR_HEADER)
310         $(MAKE) abi_headers="$^" do_abi_check
312 do_abi_check:
313         set -ex; \
314         for file in $(abi_headers); do \
315                  @CC@ -E -nostdinc -dI -DMYSQL_ABI_CHECK \
316                           -I$(top_srcdir)/include \
317                           -I$(top_srcdir)/include/mysql \
318                           -I$(top_srcdir)/sql \
319                           -I$(top_builddir)/include \
320                           -I$(top_builddir)/include/mysql \
321                           -I$(top_builddir)/sql \
322                                          $$file 2>/dev/null | \
323                           @SED@ -e '/^# /d' \
324                                     -e '/^[     ]*$$/d' \
325                                     -e '/^#pragma GCC set_debug_pwd/d' \
326                                     -e '/^#ident/d' > \
327                                                $(top_builddir)/abi_check.out; \
328                           @DIFF@ -w $$file.pp $(top_builddir)/abi_check.out; \
329                           @RM@ $(top_builddir)/abi_check.out; \
330         done
332 # Don't update the files from bitkeeper
333 %::SCCS/s.%