You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

333 lines
12 KiB

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