Makefile.am 6.26 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# 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
SUBDIRS = ndb
21
DIST_SUBDIRS=ndb
unknown's avatar
unknown committed
22

23 24
benchdir_root=		$(prefix)
testdir =	        $(benchdir_root)/mysql-test
unknown's avatar
unknown committed
25
EXTRA_SCRIPTS = 	mysql-test-run.sh mysql-test-run.pl install_test_db.sh valgrind.supp
26
EXTRA_DIST = 		$(EXTRA_SCRIPTS) 
unknown's avatar
unknown committed
27
test_SCRIPTS = 		mysql-test-run install_test_db 
28 29
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
30
CLEANFILES = 		$(test_SCRIPTS) $(test_DATA)
31

unknown's avatar
unknown committed
32
INCLUDES =		-I$(top_builddir)/include -I$(top_srcdir)/include -I..
unknown's avatar
unknown committed
33
EXTRA_PROGRAMS =	mysql_test_run_new
34
noinst_HEADERS =	my_manage.h
unknown's avatar
unknown committed
35
mysql_test_run_new_SOURCES=		mysql_test_run_new.c my_manage.c my_create_tables.c
unknown's avatar
unknown committed
36 37


38
dist-hook:
39 40 41 42 43 44 45 46
	mkdir -p \
		$(distdir)/t \
                $(distdir)/extra/binlog_tests \
                $(distdir)/extra/rpl_tests \
		$(distdir)/r \
		$(distdir)/include \
		$(distdir)/std_data \
		$(distdir)/lib
unknown's avatar
unknown committed
47
	-$(INSTALL_DATA) $(srcdir)/t/*.def $(distdir)/t
48
	$(INSTALL_DATA) $(srcdir)/t/*.test $(distdir)/t
unknown's avatar
unknown committed
49
	-$(INSTALL_DATA) $(srcdir)/t/*.imtest $(distdir)/t
50
	$(INSTALL_DATA) $(srcdir)/t/*.sql $(distdir)/t
51
	-$(INSTALL_DATA) $(srcdir)/t/*.disabled $(distdir)/t
52 53
	$(INSTALL_DATA) $(srcdir)/t/*.opt $(srcdir)/t/*.slave-mi $(distdir)/t
	$(INSTALL_SCRIPT) $(srcdir)/t/*.sh $(distdir)/t
54 55 56 57
	$(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.test $(distdir)/extra/binlog_tests
	$(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.test $(distdir)/extra/rpl_tests
	-$(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.opt $(distdir)/extra/binlog_tests
	-$(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.opt $(distdir)/extra/rpl_tests
unknown's avatar
unknown committed
58
	$(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include
59
	$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r
60
	$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(distdir)/std_data
61
	$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.000001 $(distdir)/std_data
62
	$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(distdir)/std_data
unknown's avatar
unknown committed
63
	$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data
unknown's avatar
unknown committed
64
	$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(distdir)/std_data
unknown's avatar
unknown committed
65
	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data
unknown's avatar
unknown committed
66 67
	$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(distdir)/lib
	$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
68 69 70 71

install-data-local:
	$(mkinstalldirs) \
		$(DESTDIR)$(testdir)/t \
72 73
		$(DESTDIR)$(testdir)/extra/binlog_tests \
		$(DESTDIR)$(testdir)/extra/rpl_tests \
74 75
		$(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 90 91 92
	$(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.test $(DESTDIR)$(testdir)/extra/binlog_tests
	$(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.test $(DESTDIR)$(testdir)/extra/rpl_tests
	-$(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.opt $(DESTDIR)$(testdir)/extra/binlog_tests
	-$(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.opt $(DESTDIR)$(testdir)/extra/rpl_tests
93 94
	$(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include
	$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data
95
	$(INSTALL_DATA) $(srcdir)/std_data/*.*001 $(DESTDIR)$(testdir)/std_data
96
	$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(DESTDIR)$(testdir)/std_data
97
	$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(DESTDIR)$(testdir)/std_data
unknown's avatar
unknown committed
98
	$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data
unknown's avatar
unknown committed
99
	$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(DESTDIR)$(testdir)/std_data
unknown's avatar
unknown committed
100
	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data
unknown's avatar
unknown committed
101 102
	$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
	$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
unknown's avatar
unknown committed
103

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

unknown's avatar
unknown committed
107 108 109 110 111 112 113 114 115
std_data/client-key.pem:
	@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
std_data/client-cert.pem:
	@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
std_data/cacert.pem:
	@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
std_data/server-cert.pem:
	@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
std_data/server-key.pem:
unknown's avatar
unknown committed
116
	@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
117 118 119 120 121 122

SUFFIXES = .sh

.sh:
	@RM@ -f $@ $@-t
	@SED@ \
123
	  -e 's!@''testdir''@!$(testdir)!g' \
124 125 126 127 128 129 130 131
	  -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
132
	  -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
133
	  -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
134
	  -e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \
unknown's avatar
unknown committed
135
	  -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
136
	  -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \
137
	  -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \
138
	  -e 's!@''USE_NDBCLUSTER''@!@TEST_NDBCLUSTER@!g' \
139 140 141 142 143 144
	  $< > $@-t
	@CHMOD@ +x $@-t
	@MV@ $@-t $@

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