Makefile.am 6.37 KB
Newer Older
unknown's avatar
unknown committed
1
# Copyright (C) 2000-2006 MySQL AB
2 3 4
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
unknown's avatar
unknown committed
5 6
# License as published by the Free Software Foundation; version 2
# of the License.
7 8 9 10 11 12 13 14 15 16
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
17

18 19
## Process this file with automake to create Makefile.in

unknown's avatar
unknown committed
20
if HAVE_NDBCLUSTER_DB
unknown's avatar
unknown committed
21
SUBDIRS = ndb
22
DIST_SUBDIRS=ndb
23
USE_NDBCLUSTER=\"--ndbcluster\"
24 25 26 27 28 29
else
# If one uses automake conditionals, automake will automatically
# include all possible branches to DIST_SUBDIRS goal.
# Reset DIST_SUBDIRS if we don't use NDB
SUBDIRS=
DIST_SUBDIRS=
30
USE_NDBCLUSTER=\"\"
unknown's avatar
unknown committed
31
endif
unknown's avatar
unknown committed
32

33 34
benchdir_root=		$(prefix)
testdir =	        $(benchdir_root)/mysql-test
35
EXTRA_SCRIPTS = 	mysql-test-run-shell.sh install_test_db.sh valgrind.supp $(PRESCRIPTS)
unknown's avatar
unknown committed
36
EXTRA_DIST = 		$(EXTRA_SCRIPTS)
37
GENSCRIPTS =		mysql-test-run-shell mysql-test-run install_test_db mtr lib/init_db.sql
unknown's avatar
unknown committed
38 39
PRESCRIPTS =		mysql-test-run.pl
test_SCRIPTS = 		$(GENSCRIPTS) $(PRESCRIPTS)
unknown's avatar
unknown committed
40 41 42 43 44
test_DATA = 		std_data/client-key.pem \
			std_data/client-cert.pem \
			std_data/cacert.pem \
			std_data/server-cert.pem \
			std_data/server-key.pem
unknown's avatar
unknown committed
45
CLEANFILES = 		$(GENSCRIPTS) $(test_DATA)
46

unknown's avatar
unknown committed
47
INCLUDES =		-I$(top_builddir)/include -I$(top_srcdir)/include -I..
unknown's avatar
unknown committed
48

49 50
dist-hook:
	mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \
unknown's avatar
unknown committed
51
		$(distdir)/std_data $(distdir)/lib
unknown's avatar
unknown committed
52
	-$(INSTALL_DATA) $(srcdir)/t/*.def $(distdir)/t
53
	$(INSTALL_DATA) $(srcdir)/t/*.test $(distdir)/t
unknown's avatar
unknown committed
54
	-$(INSTALL_DATA) $(srcdir)/t/*.imtest $(distdir)/t
55
	$(INSTALL_DATA) $(srcdir)/t/*.sql $(distdir)/t
56
	-$(INSTALL_DATA) $(srcdir)/t/*.disabled $(distdir)/t
57 58
	$(INSTALL_DATA) $(srcdir)/t/*.opt $(srcdir)/t/*.slave-mi $(distdir)/t
	$(INSTALL_SCRIPT) $(srcdir)/t/*.sh $(distdir)/t
unknown's avatar
unknown committed
59
	$(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include
60
	$(INSTALL_DATA) $(srcdir)/include/*.test $(distdir)/include
61
	$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r
62
	$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(distdir)/std_data
63
	$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.000001 $(distdir)/std_data
64
	$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(distdir)/std_data
unknown's avatar
unknown committed
65
	$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data
unknown's avatar
unknown committed
66
	$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(distdir)/std_data
67
	$(INSTALL_DATA) $(srcdir)/std_data/*.MY* $(distdir)/std_data
unknown's avatar
unknown committed
68
	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data
unknown's avatar
unknown committed
69
	$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
70 71 72 73 74 75

install-data-local:
	$(mkinstalldirs) \
		$(DESTDIR)$(testdir)/t \
		$(DESTDIR)$(testdir)/r \
		$(DESTDIR)$(testdir)/include \
unknown's avatar
unknown committed
76 77
		$(DESTDIR)$(testdir)/std_data \
		$(DESTDIR)$(testdir)/lib
78
	$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir)
unknown's avatar
unknown committed
79
	-$(INSTALL_DATA) $(srcdir)/t/*.def $(DESTDIR)$(testdir)/t
80
	$(INSTALL_DATA) $(srcdir)/t/*.test $(DESTDIR)$(testdir)/t
unknown's avatar
unknown committed
81
	-$(INSTALL_DATA) $(srcdir)/t/*.imtest $(DESTDIR)$(testdir)/t
82
	$(INSTALL_DATA) $(srcdir)/t/*.sql $(DESTDIR)$(testdir)/t
83
	-$(INSTALL_DATA) $(srcdir)/t/*.disabled $(DESTDIR)$(testdir)/t
84
	$(INSTALL_DATA) $(srcdir)/t/*.opt $(DESTDIR)$(testdir)/t
85
	$(INSTALL_SCRIPT) $(srcdir)/t/*.sh $(DESTDIR)$(testdir)/t
86
	$(INSTALL_DATA) $(srcdir)/t/*.slave-mi $(DESTDIR)$(testdir)/t
87
	$(INSTALL_DATA) $(srcdir)/r/*.result $(DESTDIR)$(testdir)/r
unknown's avatar
unknown committed
88
	$(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r
89
	$(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include
90
	$(INSTALL_DATA) $(srcdir)/include/*.test $(DESTDIR)$(testdir)/include
91
	$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data
92
	$(INSTALL_DATA) $(srcdir)/std_data/*.*001 $(DESTDIR)$(testdir)/std_data
93
	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data
94
	$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(DESTDIR)$(testdir)/std_data
95
	$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(DESTDIR)$(testdir)/std_data
unknown's avatar
unknown committed
96
	$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data
unknown's avatar
unknown committed
97
	$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(DESTDIR)$(testdir)/std_data
unknown's avatar
unknown committed
98
	$(INSTALL_DATA) $(srcdir)/std_data/*.MY* $(DESTDIR)$(testdir)/std_data
unknown's avatar
unknown committed
99
	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data
unknown's avatar
unknown committed
100
	$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
unknown's avatar
unknown committed
101

unknown's avatar
unknown committed
102 103 104
uninstall-local:
	@RM@ -f -r $(DESTDIR)$(testdir)

105
std_data/client-key.pem: $(top_srcdir)/SSL/$(@F)
106
	@RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
107
std_data/client-cert.pem: $(top_srcdir)/SSL/$(@F)
108
	@RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
109
std_data/cacert.pem: $(top_srcdir)/SSL/$(@F)
110
	@RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
111
std_data/server-cert.pem: $(top_srcdir)/SSL/$(@F)
112
	@RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
113
std_data/server-key.pem: $(top_srcdir)/SSL/$(@F)
114
	@RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
115

116 117 118 119 120
# mtr - a shortcut for executing mysql-test-run.pl
mtr:
	$(RM) -f mtr
	$(LN_S) mysql-test-run.pl mtr

unknown's avatar
unknown committed
121 122 123 124 125
# mysql-test-run - a shortcut for executing mysql-test-run.pl
mysql-test-run:
	$(RM) -f mysql-test-run
	$(LN_S) mysql-test-run.pl mysql-test-run

126 127 128 129 130
# Build init_db.sql by executing mysql_create_system_tables
lib/init_db.sql:
	$(top_builddir)/scripts/mysql_create_system_tables \
          test . \@HOSTNAME\@ > lib/init_db.sql

131 132 133 134 135
SUFFIXES = .sh

.sh:
	@RM@ -f $@ $@-t
	@SED@ \
136
	  -e 's!@''testdir''@!$(testdir)!g' \
137 138 139 140 141 142 143 144
	  -e 's!@''bindir''@!$(bindir)!g' \
	  -e 's!@''scriptdir''@!$(bindir)!g' \
	  -e 's!@''prefix''@!$(prefix)!g' \
	  -e 's!@''datadir''@!$(datadir)!g' \
	  -e 's!@''localstatedir''@!$(localstatedir)!g' \
	  -e 's!@''libexecdir''@!$(libexecdir)!g' \
	  -e 's!@''PERL''@!@PERL@!' \
	  -e 's!@''VERSION''@!@VERSION@!' \
unknown's avatar
unknown committed
145
	  -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
146
	  -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
147
	  -e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \
unknown's avatar
unknown committed
148
	  -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
149
	  -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \
150
	  -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \
151
	  -e 's!@''USE_NDBCLUSTER''@!$(USE_NDBCLUSTER)!g' \
152 153 154 155 156 157
	  $< > $@-t
	@CHMOD@ +x $@-t
	@MV@ $@-t $@

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