Makefile.am 7.99 KB
Newer Older
1
# Copyright (C) 2000-2006 MySQL AB
bk@work.mysql.com's avatar
bk@work.mysql.com committed
2 3 4
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; version 2 of the License.
bk@work.mysql.com's avatar
bk@work.mysql.com committed
6 7 8 9 10 11 12 13 14 15 16 17 18
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

# Process this file with automake to create Makefile.in

AUTOMAKE_OPTIONS =	foreign
19

bk@work.mysql.com's avatar
bk@work.mysql.com committed
20
# These are built from source in the Docs directory
kent@mysql.com's avatar
kent@mysql.com committed
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@ \
27 28
			@sql_union_dirs@ unittest storage plugin \
			@sql_server@ @man_dirs@ tests \
29
			netware @libmysqld_dirs@ \
30
			mysql-test support-files sql-bench @tools_dirs@ \
31
			win
32

33 34 35 36 37 38 39 40
DIST_SUBDIRS =		. include Docs zlib \
			cmd-line-utils sql-common scripts \
			pstack \
			strings mysys dbug extra regex libmysql libmysql_r client unittest storage plugin \
			vio sql man tests \
			netware libmysqld \
			mysql-test support-files sql-bench server-tools \
			win \
41
			BUILD
kent@mysql.com's avatar
kent@mysql.com committed
42
DISTCLEANFILES = ac_available_languages_fragment
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
43

bk@work.mysql.com's avatar
bk@work.mysql.com committed
44 45 46 47 48
# Create permission databases
init-db:		all
	$(top_builddir)/scripts/mysql_install_db

bin-dist:		all
49
	$(top_builddir)/scripts/make_binary_distribution @MAKE_BINARY_DISTRIBUTION_OPTIONS@
bk@work.mysql.com's avatar
bk@work.mysql.com committed
50

51
# Remove BK's "SCCS" subdirectories from source distribution
52
# Create initial database files for Windows installations.
53
dist-hook:
kent@mysql.com's avatar
kent@mysql.com committed
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 59
		--datadir=$(distdir)/win/data \
		--srcdir=$(top_srcdir)
60

61
tags:
62
	support-files/build-tags
63

tsmith/tim@siva.hindu.god's avatar
tsmith/tim@siva.hindu.god committed
64 65 66
.PHONY:	init-db bin-dist \
  test    test-force    test-full    test-force-full    test-force-mem \
  test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \
67
  test-unit test-ps test-nr test-pr test-ns test-binlog-statement \
68
  test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp \
69
  test-ext-stress test-ext test-embedded test-reprepare \
70 71
  test-fast test-fast-cursor test-fast-view test-fast-prepare \
  test-full-qa
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
72

kent@mysql.com's avatar
kent@mysql.com committed
73 74 75 76 77 78 79
# Target 'test' will run the regression test suite using the built server.
#
# If you are running in a shared environment, users can avoid clashing
# port numbers by setting individual small numbers 1-100 to the
# environment variable MTR_BUILD_THREAD. The script "mysql-test-run"
# will then calculate the various port numbers it needs from this,
# making sure each user use different ports.
kent@mysql.com's avatar
kent@mysql.com committed
80

81 82 83 84
test-unit:
	cd unittest && $(MAKE) test

test-ps:
85
	cd mysql-test ; \
86
	    @PERL@ ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=mixed
87

88
test-nr:
89
	cd mysql-test ; \
90
	    @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=row
kent@mysql.com's avatar
kent@mysql.com committed
91

92
test-pr:
93
	cd mysql-test ; \
94
	    @PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol --mysqld=--binlog-format=row
95

96
test-ns:
97
	cd mysql-test ; \
98
	    @PERL@ ./mysql-test-run.pl $(force) $(mem) --mysqld=--binlog-format=mixed
99 100

test-binlog-statement:
101
	cd mysql-test ; \
102
	    @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement
103

joerg@trift2's avatar
joerg@trift2 committed
104
# This code is duplicated in "test-bt", see the Changeset comment of 2007-Dec-07
joerg@trift2's avatar
joerg@trift2 committed
105 106 107
test-embedded:
	if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \
	  cd mysql-test ; MTR_BUILD_THREAD=auto \
108 109
	      @PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
	          --embedded-server --skip-rpl --skip-ndbcluster ; \
joerg@trift2's avatar
joerg@trift2 committed
110 111 112 113
	else \
	  echo "no program found for 'embedded' tests - skipped testing" ; \
	fi

114 115 116 117 118
test-reprepare:
	cd mysql-test ; \
	    @PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol \
		--mysqld=--debug=+d,reprepare_each_statement

119 120 121 122 123 124 125 126 127
test:	test-unit test-ns test-pr

test-full:	test test-nr test-ps

test-force:
	$(MAKE) force=--force test

test-force-full:
	$(MAKE) force=--force test-full
monty@mysql.com's avatar
monty@mysql.com committed
128

129 130
#used by autopush.pl to run memory based tests
test-force-mem:
131
	$(MAKE) force=--force mem=--mem test
132

133 134
test-bt:
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
135 136
	    @PERL@ ./mysql-test-run.pl --comment=normal --force --timer \
	        --skip-ndbcluster --report-features
137
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
138 139
	    @PERL@ ./mysql-test-run.pl  --comment=ps    --force --timer \
	        --skip-ndbcluster --ps-protocol
140 141 142
	-if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
	  cd mysql-test ; \
	    MTR_BUILD_THREAD=auto \
143 144
	      @PERL@ ./mysql-test-run.pl --comment=ndb+rpl_ndb+ps --force --timer \
	          --ps-protocol --mysqld=--binlog-format=row --suite=ndb,rpl_ndb ; \
145
	    MTR_BUILD_THREAD=auto \
146
	      @PERL@ ./mysql-test-run.pl --comment=ndb --force --timer \
147 148 149 150
	          --with-ndbcluster-only ; \
	else \
	  echo "no program found for 'ndbcluster' tests - skipped testing" ; \
	fi
151
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
152
	    @PERL@ ./mysql-test-run.pl --force --comment=funcs1+ps --ps-protocol --suite=funcs_1
153
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
154
	    @PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2
155
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
156
	    @PERL@ ./mysql-test-run.pl --force --comment=partitions --suite=parts
157 158
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
	    @PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
159 160
	-if [ -d mysql-test/suite/nist ] ; then \
	  cd mysql-test ; MTR_BUILD_THREAD=auto \
161
	      @PERL@ ./mysql-test-run.pl --comment=nist --force --suite=nist ; \
162 163 164
	fi
	-if [ -d mysql-test/suite/nist ] ; then \
	  cd mysql-test ; MTR_BUILD_THREAD=auto \
165 166 167 168 169 170 171 172
	      @PERL@ ./mysql-test-run.pl --comment=nist+ps --force --suite=nist --ps-protocol ; \
	fi
	-if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \
	  cd mysql-test ; MTR_BUILD_THREAD=auto \
	      @PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
	          --embedded-server --skip-rpl --skip-ndbcluster ; \
	else \
	  echo "no program found for 'embedded' tests - skipped testing" ; \
173
	fi
174

175 176
# Re-enable the "jp" suite when bug#28563 is fixed
#	-cd mysql-test ; MTR_BUILD_THREAD=auto \
177
#	    @PERL@ ./mysql-test-run.pl --force --comment=jp --suite=jp
178

179 180
test-bt-debug:
	-cd mysql-test ; MTR_BUILD_THREAD=auto \
181 182
	    @PERL@ ./mysql-test-run.pl --comment=debug  --force --timer \
	        --skip-ndbcluster --skip-rpl --report-features
183

184 185 186 187
# Keep these for a while
test-pl:	test
test-full-pl:	test-full
test-force-pl:	test-force
188
test-force-pl-mem:  test-force-mem
189 190
test-force-full-pl: test-force-full

191 192
test-ext-funcs:
	cd mysql-test ; \
193 194
	    @PERL@ ./mysql-test-run.pl --force --suite=funcs_1 ; \
	    @PERL@ ./mysql-test-run.pl --force --suite=funcs_2
195 196 197

test-ext-rpl:
	cd mysql-test ; \
198
	    @PERL@ ./mysql-test-run.pl --force --suite=rpl
199 200 201

test-ext-partitions:
	cd mysql-test ; \
202
	    @PERL@ ./mysql-test-run.pl --force --suite=parts
203 204 205

test-ext-jp:
	cd mysql-test ; \
206
	    @PERL@ ./mysql-test-run.pl --force --suite=jp
207

208 209
test-ext-stress:
	cd mysql-test ; \
210
	    @PERL@ ./mysql-test-run.pl --force --big-test --suite=stress
211 212

test-ext:	test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp test-ext-stress
213 214 215

test-fast:
	cd mysql-test ; \
216 217 218
	    @PERL@ ./mysql-test-run.pl $(subset) --force --skip-ndb --skip-innodb --skip-im --skip-rpl ; \
	    @PERL@ ./mysql-test-run.pl $(subset) --force --suite=funcs_1 --do-test=myisam ; \
	    @PERL@ ./mysql-test-run.pl $(subset) --force --suite=stress --do-test=ddl_myisam 
219 220 221 222 223 224 225 226 227 228 229 230

test-fast-view:
	$(MAKE) subset=--view-protocol test-fast

test-fast-cursor:
	$(MAKE) subset=--cursor-protocol test-fast

test-fast-prepare:
	$(MAKE) subset=--ps-protocol test-fast

test-full-qa:
	$(MAKE) force=--force test-pr \
231 232
	    test-binlog-statement test-ext test-fast-view \
	        test-fast-cursor test-unit
233

234 235
# Don't update the files from bitkeeper
%::SCCS/s.%