~ubuntu-branches/ubuntu/maverick/mysql-dfsg-5.1/maverick

0.2.5 by Norbert Tretkowski
Import upstream version 5.1.40
1
# Copyright 2000-2008 MySQL AB, 2009 Sun Microsystems, Inc.
1 by Chuck Short
Import upstream version 5.1.30
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
15
16
# Process this file with automake to create Makefile.in
17
18
AUTOMAKE_OPTIONS =	foreign
19
20
# These are built from source in the Docs directory
21
EXTRA_DIST =		INSTALL-SOURCE INSTALL-WIN-SOURCE \
22
			README COPYING EXCEPTIONS-CLIENT CMakeLists.txt
23
24
SUBDIRS =		. include @docs_dirs@ @zlib_dir@ \
25
			@readline_topdir@ sql-common scripts \
26
			@pstack_dir@ \
0.2.5 by Norbert Tretkowski
Import upstream version 5.1.40
27
			@sql_union_dirs@ unittest \
1 by Chuck Short
Import upstream version 5.1.30
28
			@sql_server@ @man_dirs@ tests \
29
			netware @libmysqld_dirs@ \
30
			mysql-test support-files sql-bench @tools_dirs@ \
31
			win
32
33
DIST_SUBDIRS =		. include Docs zlib \
34
			cmd-line-utils sql-common scripts \
35
			pstack \
36
			strings mysys dbug extra regex libmysql libmysql_r client unittest storage plugin \
37
			vio sql man tests \
38
			netware libmysqld \
39
			mysql-test support-files sql-bench server-tools \
40
			win \
41
			BUILD
42
DISTCLEANFILES = ac_available_languages_fragment
43
44
# Create permission databases
45
init-db:		all
46
	$(top_builddir)/scripts/mysql_install_db
47
48
bin-dist:		all
49
	$(top_builddir)/scripts/make_binary_distribution @MAKE_BINARY_DISTRIBUTION_OPTIONS@
50
51
# Remove BK's "SCCS" subdirectories from source distribution
52
# Create initial database files for Windows installations and check them.
53
dist-hook:
54
	rm -rf `find $(distdir) -type d -name SCCS -print`
55
	mkdir -p $(distdir)/win
56
	scripts/mysql_install_db --no-defaults --cross-bootstrap \
57
		--builddir=$(top_builddir) \
58
		--datadir=$(distdir)/win/data \
59
		--srcdir=$(top_srcdir)
60
	storage/myisam/myisamchk --silent --fast $(distdir)/win/data/mysql/*.MYI
61
62
all-local:		@ABI_CHECK@	
63
64
tags:
65
	support-files/build-tags
66
67
.PHONY:	init-db bin-dist \
68
  test    test-force    test-full    test-force-full    test-force-mem \
69
  test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \
70
  test-unit test-ps test-nr test-pr test-ns test-binlog-statement \
71
  test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp \
72
  test-ext-stress test-ext test-embedded test-reprepare \
73
  test-fast test-fast-cursor test-fast-view test-fast-prepare \
74
  test-full-qa
75
76
# Target 'test' will run the regression test suite using the built server.
77
#
78
# If you are running in a shared environment, users can avoid clashing
79
# port numbers by setting individual small numbers 1-100 to the
80
# environment variable MTR_BUILD_THREAD. The script "mysql-test-run"
81
# will then calculate the various port numbers it needs from this,
82
# making sure each user use different ports.
83
84
test-unit:
85
	cd unittest && $(MAKE) test
86
87
test-ps:
88
	cd mysql-test ; \
89
	    @PERL@ ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=mixed
90
91
test-nr:
92
	cd mysql-test ; \
93
	    @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=row
94
95
test-pr:
96
	cd mysql-test ; \
97
	    @PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol --mysqld=--binlog-format=row
98
99
test-ns:
100
	cd mysql-test ; \
101
	    @PERL@ ./mysql-test-run.pl $(force) $(mem) --mysqld=--binlog-format=mixed
102
103
test-binlog-statement:
104
	cd mysql-test ; \
105
	    @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement
106
107
# This code is duplicated in "test-bt", see the Changeset comment of 2007-Dec-07
108
test-embedded:
109
	if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \
110
	  cd mysql-test ; MTR_BUILD_THREAD=auto \
111
	      @PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
112
	          --embedded-server --skip-rpl --skip-ndbcluster ; \
113
	else \
114
	  echo "no program found for 'embedded' tests - skipped testing" ; \
115
	fi
116
117
test-reprepare:
118
	cd mysql-test ; \
119
	    @PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol \
120
		--mysqld=--debug=+d,reprepare_each_statement
121
122
test:	test-unit test-ns test-pr
123
0.1.1 by Norbert Tretkowski
Import upstream version 5.1.32
124
smoke:
125
	cd mysql-test ; \
126
	    @PERL@ ./mysql-test-run.pl --do-test=s
127
1 by Chuck Short
Import upstream version 5.1.30
128
test-full:	test test-nr test-ps
129
130
test-force:
131
	$(MAKE) force=--force test
132
133
test-force-full:
134
	$(MAKE) force=--force test-full
135
136
#used by autopush.pl to run memory based tests
137
test-force-mem:
138
	$(MAKE) force=--force mem=--mem test
139
140
test-bt:
141
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
142
	    @PERL@ ./mysql-test-run.pl --comment=normal --force --timer \
143
	        --skip-ndbcluster --report-features
144
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
145
	    @PERL@ ./mysql-test-run.pl  --comment=ps    --force --timer \
146
	        --skip-ndbcluster --ps-protocol
147
	-if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
148
	  cd mysql-test ; \
149
	    MTR_BUILD_THREAD=auto \
150
	      @PERL@ ./mysql-test-run.pl --comment=ndb+rpl_ndb+ps --force --timer \
151
	          --ps-protocol --mysqld=--binlog-format=row --suite=ndb,rpl_ndb ; \
152
	    MTR_BUILD_THREAD=auto \
153
	      @PERL@ ./mysql-test-run.pl --comment=ndb --force --timer \
154
	          --with-ndbcluster-only ; \
155
	else \
156
	  echo "no program found for 'ndbcluster' tests - skipped testing" ; \
157
	fi
158
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
159
	    @PERL@ ./mysql-test-run.pl --force --comment=funcs1+ps --ps-protocol --reorder --suite=funcs_1
160
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
161
	    @PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2
162
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
163
	    @PERL@ ./mysql-test-run.pl --force --comment=partitions --suite=parts
164
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
165
	    @PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
166
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
167
	    @PERL@ ./mysql-test-run.pl --force --comment=jp --suite=jp
168
	-if [ -d mysql-test/suite/nist ] ; then \
169
	  cd mysql-test ; MTR_BUILD_THREAD=auto \
170
	      @PERL@ ./mysql-test-run.pl --comment=nist --force --suite=nist ; \
171
	fi
172
	-if [ -d mysql-test/suite/nist ] ; then \
173
	  cd mysql-test ; MTR_BUILD_THREAD=auto \
174
	      @PERL@ ./mysql-test-run.pl --comment=nist+ps --force --suite=nist --ps-protocol ; \
175
	fi
176
	-if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \
177
	  cd mysql-test ; MTR_BUILD_THREAD=auto \
178
	      @PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
179
	          --embedded-server --skip-rpl --skip-ndbcluster ; \
180
	else \
181
	  echo "no program found for 'embedded' tests - skipped testing" ; \
182
	fi
183
184
test-bt-fast:
185
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
186
	    @PERL@ ./mysql-test-run.pl  --comment=ps    --force --timer \
1.1.1 by Mathias Gug
Import upstream version 5.1.31
187
	        --skip-ndbcluster --ps-protocol --report-features
1 by Chuck Short
Import upstream version 5.1.30
188
	-if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
189
	  cd mysql-test ; \
190
	    MTR_BUILD_THREAD=auto \
191
	      @PERL@ ./mysql-test-run.pl --comment=ndb --force --timer \
192
	          --with-ndbcluster-only ; \
193
	else \
194
	  echo "no program found for 'ndbcluster' tests - skipped testing" ; \
195
	fi
196
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
197
	    @PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
198
0.2.6 by Norbert Tretkowski
Import upstream version 5.1.41
199
test-bt-fast:
200
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
201
	    @PERL@ ./mysql-test-run.pl --force --comment=ps --ps-protocol --report-features
202
1 by Chuck Short
Import upstream version 5.1.30
203
test-bt-debug:
204
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
205
	    @PERL@ ./mysql-test-run.pl --comment=debug  --force --timer \
206
	        --skip-ndbcluster --skip-rpl --report-features
207
208
test-bt-debug-fast:
209
0.2.6 by Norbert Tretkowski
Import upstream version 5.1.41
210
test-bt-debug-fast:
211
1 by Chuck Short
Import upstream version 5.1.30
212
# Keep these for a while
213
test-pl:	test
214
test-full-pl:	test-full
215
test-force-pl:	test-force
216
test-force-pl-mem:  test-force-mem
217
test-force-full-pl: test-force-full
218
219
test-ext-funcs:
220
	cd mysql-test ; \
221
	    @PERL@ ./mysql-test-run.pl --force --reorder --suite=funcs_1 ; \
222
	    @PERL@ ./mysql-test-run.pl --force --suite=funcs_2
223
224
test-ext-rpl:
225
	cd mysql-test ; \
226
	    @PERL@ ./mysql-test-run.pl --force --suite=rpl
227
228
test-ext-partitions:
229
	cd mysql-test ; \
230
	    @PERL@ ./mysql-test-run.pl --force --suite=parts
231
232
test-ext-jp:
233
	cd mysql-test ; \
234
	    @PERL@ ./mysql-test-run.pl --force --suite=jp
235
236
test-ext-stress:
237
	cd mysql-test ; \
238
	    @PERL@ ./mysql-test-run.pl --force --big-test --suite=stress
239
240
test-ext:	test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp test-ext-stress
241
242
test-fast:
243
	cd mysql-test ; \
244
	    @PERL@ ./mysql-test-run.pl $(subset) --force --skip-ndb --skip-innodb --skip-im --skip-rpl ; \
245
	    @PERL@ ./mysql-test-run.pl $(subset) --force --suite=funcs_1 --do-test=myisam ; \
246
	    @PERL@ ./mysql-test-run.pl $(subset) --force --suite=stress --do-test=ddl_myisam 
247
248
test-fast-view:
249
	$(MAKE) subset=--view-protocol test-fast
250
251
test-fast-cursor:
252
	$(MAKE) subset=--cursor-protocol test-fast
253
254
test-fast-prepare:
255
	$(MAKE) subset=--ps-protocol test-fast
256
257
test-full-qa:
258
	$(MAKE) force=--force test-pr \
259
	    test-binlog-statement test-ext test-fast-view \
260
	        test-fast-cursor test-unit
261
262
#
263
# Headers which need to be checked for abi/api compatibility.
264
# API_PREPROCESSOR_HEADER will be used until mysql_priv.h stablizes
265
# after which TEST_PREPROCESSOR_HEADER will be used.
266
#
267
268
API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin.h \
269
                           $(top_srcdir)/include/mysql.h
270
271
TEST_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin.h \
272
                            $(top_srcdir)/sql/mysql_priv.h \
273
                            $(top_srcdir)/include/mysql.h
274
275
#
276
# Rules for checking that the abi/api has not changed.
277
#
278
# The following steps are followed in the do_abi_check rule below
279
#
280
# 1) Generate preprocessor output for the files that need to
281
#    be tested for abi/api changes. use -nostdinc to prevent
282
#    generation of preprocessor output for system headers. This
283
#    results in messages in stderr saying that these headers
284
#    were not found. Redirect the stderr output to /dev/null
285
#    to prevent seeing these messages.
286
# 2) sed the output to 
287
#    2.1) remove blank lines and lines that begin with "# "
288
#    2.2) When gcc -E is run on the Mac OS  and solaris sparc platforms it
289
#         introduces a line of output that shows up as a difference between
290
#         the .pp and .out files. Remove these OS specific preprocessor text
291
#         inserted by the preprocessor.
292
# 3) diff the generated file and the canons (.pp files already in
293
#    the repository).
294
# 4) delete the .out file that is generated.
295
#
296
# If the diff fails, the generated file is not removed. This will
297
# be useful for analysis of ABI differences (e.g. using a visual
298
# diff tool).
299
#
300
# A ABI change that causes a build to fail will always be accompanied
301
# by new canons (.out files). The .out files that are not removed will
302
# be replaced as the new .pp files.
303
#
304
# e.g. If include/mysql/plugin.h has an ABI change then this rule would
305
# leave a <build directory>/abi_check.out file.
306
#
307
# A developer with a justified API change will then do a
308
# mv <build directory>/abi_check.out include/mysql/plugin.pp 
309
# to replace the old canons with the new ones.
310
#
311
312
abi_check:	$(API_PREPROCESSOR_HEADER)
313
	$(MAKE) abi_headers="$^" do_abi_check
314
315
abi_check_all:	$(TEST_PREPROCESSOR_HEADER)
316
	$(MAKE) abi_headers="$^" do_abi_check
317
318
do_abi_check:
319
	set -ex; \
320
	for file in $(abi_headers); do \
321
	         @CC@ -E -nostdinc -dI \
322
	                  -I$(top_srcdir)/include \
323
	                  -I$(top_srcdir)/include/mysql \
324
	                  -I$(top_srcdir)/sql \
325
	                  -I$(top_builddir)/include \
326
	                  -I$(top_builddir)/include/mysql \
327
	                  -I$(top_builddir)/sql \
328
	                                 $$file 2>/dev/null | \
329
	                  @SED@ -e '/^# /d' \
330
	                            -e '/^[ 	]*$$/d' \
331
	                            -e '/^#pragma GCC set_debug_pwd/d' \
332
	                            -e '/^#ident/d' > \
333
	                                       $(top_builddir)/abi_check.out; \
334
	                  @DIFF@ -w $$file.pp $(top_builddir)/abi_check.out; \
335
	                  @RM@ $(top_builddir)/abi_check.out; \
336
	done
337
338
# Don't update the files from bitkeeper
339
%::SCCS/s.%