Makefile.am 4.5 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@ @yassl_dir@ \
25
			@readline_topdir@ sql-common \
26
			@thread_dirs@ pstack \
kent@mysql.com's avatar
kent@mysql.com committed
27
			@sql_union_dirs@ scripts @man_dirs@ tests \
28
			netware @libmysqld_dirs@ \
29
			@bench_dirs@ support-files @tools_dirs@
30 31

DIST_SUBDIRS =		. include @docs_dirs@ zlib \
32
			@readline_topdir@ sql-common \
33
			@thread_dirs@ pstack \
34
			@sql_union_dirs@ scripts @man_dirs@ tests SSL\
35
			BUILD netware os2 @libmysqld_dirs@ \
36
			@bench_dirs@ support-files @tools_dirs@ win
bk@work.mysql.com's avatar
bk@work.mysql.com committed
37

kent@mysql.com's avatar
kent@mysql.com committed
38 39 40 41 42
# 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@ \
43
		 linked_include_sources @linked_netware_sources@
44

kent@mysql.com's avatar
kent@mysql.com committed
45 46 47 48 49 50
# 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
51 52 53 54

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

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

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

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

68 69 70 71
linked_libmysqld_sources:
	cd libmysqld; $(MAKE) link_sources
	echo timestamp > linked_libmysqld_sources

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

76 77 78 79
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
80
linked_server_sources:
kent@mysql.com's avatar
kent@mysql.com committed
81
	cd sql; $(MAKE) link_sources
bk@work.mysql.com's avatar
bk@work.mysql.com committed
82 83 84 85 86 87 88
	echo timestamp > linked_server_sources

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

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

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

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

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

monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
117
test:
kent@mysql.com's avatar
kent@mysql.com committed
118
	cd mysql-test ; \
119 120
	./mysql-test-run && \
	./mysql-test-run --ps-protocol
121

monty@mysql.com's avatar
monty@mysql.com committed
122
test-force:
123
	cd mysql-test; \
124
	./mysql-test-run --force && \
125
	./mysql-test-run --ps-protocol --force
kent@mysql.com's avatar
kent@mysql.com committed
126

127
# We are testing a new Perl version of the test script
kent@mysql.com's avatar
kent@mysql.com committed
128
test-pl:
129 130 131
	cd mysql-test; \
	./mysql-test-run.pl && \
	./mysql-test-run.pl --ps-protocol
kent@mysql.com's avatar
kent@mysql.com committed
132 133

test-force-pl:
134
	cd mysql-test; \
135
	./mysql-test-run.pl --force && \
136
	./mysql-test-run.pl --ps-protocol --force
kent@mysql.com's avatar
kent@mysql.com committed
137 138 139

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