Makefile.am 4.97 KB
Newer Older
bk@work.mysql.com's avatar
bk@work.mysql.com committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
# 
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# 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
20

bk@work.mysql.com's avatar
bk@work.mysql.com committed
21
# These are built from source in the Docs directory
kent@mysql.com's avatar
kent@mysql.com committed
22
EXTRA_DIST =		INSTALL-SOURCE INSTALL-WIN-SOURCE \
23
			README COPYING EXCEPTIONS-CLIENT cmakelists.txt
24
SUBDIRS =		. include @docs_dirs@ @zlib_dir@ \
25
			@readline_topdir@ sql-common \
26
			@thread_dirs@ pstack \
27
			@sql_union_dirs@ storage \
28
			@sql_server@ scripts @man_dirs@ tests \
29
			@mysql_se_plugins@ \
30
			netware @libmysqld_dirs@ \
31
			@bench_dirs@ support-files @tools_dirs@ \
32
			plugin unittest win
33

serg@serg.mylan's avatar
serg@serg.mylan committed
34
DIST_SUBDIRS =		$(SUBDIRS) BUILD
bk@work.mysql.com's avatar
bk@work.mysql.com committed
35

kent@mysql.com's avatar
kent@mysql.com committed
36 37 38 39 40
# Run these targets before any others, also make part of clean target,
# to make sure we create new links after a clean.
BUILT_SOURCES = linked_client_sources linked_server_sources \
		 @linked_client_targets@ \
		 @linked_libmysqld_targets@ \
41
		 linked_include_sources @linked_netware_sources@
42

kent@mysql.com's avatar
kent@mysql.com committed
43 44 45 46 47 48
# The db.h file is a bit special, see note in "configure.in".
# In the case we didn't compile with bdb, a dummy file is put
# there, but will not be removed by the bdb make file becuase
# it will never be called.
CLEANFILES = $(BUILT_SOURCES) bdb/build_unix/db.h
DISTCLEANFILES = ac_available_languages_fragment
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
49 50 51 52

linked_include_sources:
	cd include; $(MAKE) link_sources
	echo timestamp > linked_include_sources
bk@work.mysql.com's avatar
bk@work.mysql.com committed
53

54
linked_client_sources:  @linked_client_targets@
55
	cd client; $(MAKE) link_sources
56 57 58
	echo timestamp > linked_client_sources

linked_libmysql_sources:
bk@work.mysql.com's avatar
bk@work.mysql.com committed
59
	cd libmysql; $(MAKE) link_sources
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
60
	echo timestamp > linked_libmysql_sources
61 62

linked_libmysql_r_sources: linked_libmysql_sources
63
	cd libmysql_r; $(MAKE) link_sources
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
64
	echo timestamp > linked_libmysql_r_sources
bk@work.mysql.com's avatar
bk@work.mysql.com committed
65

66 67 68 69
linked_libmysqld_sources:
	cd libmysqld; $(MAKE) link_sources
	echo timestamp > linked_libmysqld_sources

70 71 72 73
linked_libmysqldex_sources:
	cd libmysqld/examples; $(MAKE) link_sources
	echo timestamp > linked_libmysqldex_sources

74 75 76 77
linked_netware_sources:
	cd @netware_dir@; $(MAKE) link_sources
	echo timestamp > linked_netware_sources

bk@work.mysql.com's avatar
bk@work.mysql.com committed
78
linked_server_sources:
kent@mysql.com's avatar
kent@mysql.com committed
79
	cd sql; $(MAKE) link_sources
bk@work.mysql.com's avatar
bk@work.mysql.com committed
80 81 82 83 84 85 86
	echo timestamp > linked_server_sources

# Create permission databases
init-db:		all
	$(top_builddir)/scripts/mysql_install_db

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

89
# Remove BK's "SCCS" subdirectories from source distribution
90
# Create initial database files for Windows installations.
91
dist-hook:
kent@mysql.com's avatar
kent@mysql.com committed
92
	rm -rf `find $(distdir) -type d -name SCCS -print`
93 94
	if echo "$(distdir)" | grep -q '^/' ; then \
	  scripts/mysql_install_db --no-defaults --windows \
95
		--basedir=$(top_srcdir) \
96 97 98
		--datadir="$(distdir)/win/data"; \
	else \
	  scripts/mysql_install_db --no-defaults --windows \
99
		 --basedir=$(top_srcdir) \
100 101
		 --datadir="$$(pwd)/$(distdir)/win/data"; \
	fi
102

103
tags:
104
	support-files/build-tags
bk@work.mysql.com's avatar
bk@work.mysql.com committed
105
.PHONY:		init-db bin-dist
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
106

kent@mysql.com's avatar
kent@mysql.com committed
107 108 109 110 111 112 113
# 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
114

monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
115
test:
116 117 118 119
	cd mysql-test ; \
	./mysql-test-run.pl --mysqld=--binlog-format=statement && \
	./mysql-test-run.pl --ps-protocol --mysqld=--binlog-format=row

120
test-full:
121 122 123 124 125
	cd mysql-test ; \
	./mysql-test-run.pl --mysqld=--binlog-format=statement && \
	./mysql-test-run.pl --ps-protocol --mysqld=--binlog-format=statement && \
	./mysql-test-run.pl --mysqld=--binlog-format=row && \
	./mysql-test-run.pl --ps-protocol --mysqld=--binlog-format=row
kent@mysql.com's avatar
kent@mysql.com committed
126

127
test-force:
128 129 130 131
	cd mysql-test ; \
	./mysql-test-run.pl --force --mysqld=--binlog-format=statement && \
	./mysql-test-run.pl --ps-protocol --force --mysqld=--binlog-format=row

132
test-force-full:
133 134 135 136 137
	cd mysql-test ; \
	./mysql-test-run.pl --force --mysqld=--binlog-format=statement && \
	./mysql-test-run.pl --force --ps-protocol --mysqld=--binlog-format=statement && \
	./mysql-test-run.pl --force --mysqld=--binlog-format=row && \
	./mysql-test-run.pl --force --ps-protocol --mysqld=--binlog-format=row
monty@mysql.com's avatar
monty@mysql.com committed
138

139 140 141 142 143 144 145 146
# Keep these for a while
test-pl:	test
test-full-pl:	test-full
test-force-pl:	test-force
test-force-full-pl: test-force-full



147 148
# Don't update the files from bitkeeper
%::SCCS/s.%
149