Makefile.am 5.91 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

serg@serg.mylan's avatar
serg@serg.mylan committed
20
if HAVE_NDBCLUSTER_DB
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=\"\"
serg@serg.mylan's avatar
serg@serg.mylan committed
31
endif
32

33 34
benchdir_root=		$(prefix)
testdir =	        $(benchdir_root)/mysql-test
kent@mysql.com's avatar
Merge  
kent@mysql.com committed
35
EXTRA_SCRIPTS = 	mysql-test-run.sh install_test_db.sh valgrind.supp $(PRESCRIPTS)
36
EXTRA_DIST = 		$(EXTRA_SCRIPTS) 
kent@mysql.com's avatar
kent@mysql.com committed
37 38 39
GENSCRIPTS =		mysql-test-run install_test_db
PRESCRIPTS =		mysql-test-run.pl
test_SCRIPTS = 		$(GENSCRIPTS) $(PRESCRIPTS)
40 41
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 
kent@mysql.com's avatar
kent@mysql.com committed
42
CLEANFILES = 		$(GENSCRIPTS) $(test_DATA)
43

kent@mysql.com's avatar
kent@mysql.com committed
44
INCLUDES =		-I$(top_builddir)/include -I$(top_srcdir)/include -I..
kent@mysql.com's avatar
kent@mysql.com committed
45
EXTRA_PROGRAMS =	mysql_test_run_new
46
noinst_HEADERS =	my_manage.h
wax@kishkin.ru's avatar
wax@kishkin.ru committed
47
mysql_test_run_new_SOURCES=		mysql_test_run_new.c my_manage.c my_create_tables.c
wax@kishkin.ru's avatar
wax@kishkin.ru committed
48 49


50 51
dist-hook:
	mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \
kent@mysql.com's avatar
kent@mysql.com committed
52
		$(distdir)/std_data $(distdir)/lib
53
	-$(INSTALL_DATA) $(srcdir)/t/*.def $(distdir)/t
54
	$(INSTALL_DATA) $(srcdir)/t/*.test $(distdir)/t
kent@mysql.com's avatar
kent@mysql.com committed
55
	-$(INSTALL_DATA) $(srcdir)/t/*.imtest $(distdir)/t
56
	$(INSTALL_DATA) $(srcdir)/t/*.sql $(distdir)/t
57
	-$(INSTALL_DATA) $(srcdir)/t/*.disabled $(distdir)/t
58 59
	$(INSTALL_DATA) $(srcdir)/t/*.opt $(srcdir)/t/*.slave-mi $(distdir)/t
	$(INSTALL_SCRIPT) $(srcdir)/t/*.sh $(distdir)/t
60
	$(INSTALL_DATA) $(srcdir)/include/*.inc $(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
65
	$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data
joreland@mysql.com's avatar
joreland@mysql.com committed
66
	$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(distdir)/std_data
67
	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data
kent@mysql.com's avatar
kent@mysql.com committed
68 69
	$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(distdir)/lib
	$(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 \
kent@mysql.com's avatar
kent@mysql.com committed
76 77
		$(DESTDIR)$(testdir)/std_data \
		$(DESTDIR)$(testdir)/lib
78
	$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir)
79
	-$(INSTALL_DATA) $(srcdir)/t/*.def $(DESTDIR)$(testdir)/t
80
	$(INSTALL_DATA) $(srcdir)/t/*.test $(DESTDIR)$(testdir)/t
kent@mysql.com's avatar
kent@mysql.com 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
88
	$(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r
89 90
	$(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include
	$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data
91
	$(INSTALL_DATA) $(srcdir)/std_data/*.*001 $(DESTDIR)$(testdir)/std_data
92
	$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(DESTDIR)$(testdir)/std_data
93
	$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(DESTDIR)$(testdir)/std_data
94
	$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data
joreland@mysql.com's avatar
joreland@mysql.com committed
95
	$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(DESTDIR)$(testdir)/std_data
96
	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data
kent@mysql.com's avatar
kent@mysql.com committed
97 98
	$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
	$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
99

kent@mysql.com's avatar
kent@mysql.com committed
100 101 102
uninstall-local:
	@RM@ -f -r $(DESTDIR)$(testdir)

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

SUFFIXES = .sh

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

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