~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
# Copyright (C) 2000-2006 MySQL AB
2
# 
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; version 2 of the License.
6
# 
7
# This program is distributed in the hope that it will be useful,
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
# GNU General Public License for more details.
11
# 
12
# You should have received a copy of the GNU General Public License
13
# along with this program; if not, write to the Free Software
14
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
15
16
## Process this file with automake to create Makefile.in
17
18
BUILT_SOURCES = mysql_fix_privilege_tables.sql \
19
		mysql_fix_privilege_tables_sql.c
20
21
EXTRA_PROGRAMS = 	comp_sql
22
23
bin_SCRIPTS =		@server_scripts@ \
24
			msql2mysql \
25
			mysql_config \
26
			mysql_fix_privilege_tables \
27
			mysql_fix_extensions \
28
			mysql_setpermission \
29
			mysql_secure_installation \
30
			mysql_zap \
31
			mysqlaccess \
32
			mysqlbug \
33
			mysql_convert_table_format \
34
			mysql_find_rows \
35
			mysqlhotcopy \
36
			mysqldumpslow \
37
			mysqld_multi
38
39
noinst_SCRIPTS =	make_binary_distribution \
40
			make_sharedlib_distribution
41
42
EXTRA_SCRIPTS =		make_binary_distribution.sh \
43
			make_sharedlib_distribution.sh \
44
			msql2mysql.sh \
45
			mysql_config.sh \
46
			mysql_config.pl.in \
47
			mysql_fix_privilege_tables.sh \
48
			mysql_fix_extensions.sh \
49
			mysql_install_db.sh \
50
			mysql_install_db.pl.in \
51
			mysql_setpermission.sh \
52
			mysql_secure_installation.sh \
53
			mysql_secure_installation.pl.in \
54
			mysql_zap.sh \
55
			mysqlaccess.sh \
56
			mysqlbug.sh \
57
			mysql_convert_table_format.sh \
58
			mysql_find_rows.sh \
59
			mysqlhotcopy.sh \
60
			mysqldumpslow.sh \
61
			mysqld_multi.sh \
62
			mysqld_safe.sh
63
64
EXTRA_DIST =		$(EXTRA_SCRIPTS) \
65
			mysqlaccess.conf \
66
			mysqlbug \
67
			make_win_bin_dist \
68
			mysql_fix_privilege_tables_sql.c \
69
			mysql_system_tables_fix.sql \
70
			CMakeLists.txt
71
72
dist_pkgdata_DATA =	fill_help_tables.sql \
73
			mysql_fix_privilege_tables.sql \
74
			mysql_system_tables.sql \
75
			mysql_system_tables_data.sql \
76
			mysql_test_data_timezone.sql
77
78
CLEANFILES =		@server_scripts@ \
79
			make_binary_distribution \
80
			make_sharedlib_distribution \
81
			msql2mysql \
82
			mysql_config \
83
			mysql_fix_privilege_tables \
84
			mysql_fix_extensions \
85
			mysql_setpermission \
86
			mysql_secure_installation \
87
			mysql_zap \
88
			mysqlaccess \
89
			mysql_convert_table_format \
90
			mysql_find_rows \
91
			mysqlhotcopy \
92
			mysqldumpslow \
93
			mysqld_multi
94
95
pkgplugindir =		$(pkglibdir)/plugin
96
97
# Default same as 'pkgdatadir', but we can override it
98
pkgsuppdir =		$(datadir)/@PACKAGE@
99
100
# mysqlbug should be distributed built so that people can report build
101
# failures with it.
102
DISTCLEANFILES =        $(BUILT_SOURCES) mysqlbug
103
104
# We want the right version and configure comand line in mysqlbug
105
mysqlbug: ${top_builddir}/config.status mysqlbug.sh
106
107
# Build mysql_fix_privilege_tables.sql from the files that contain
108
# the system tables for this version of MySQL plus any commands
109
# needed to upgrade the system tables from an older version
110
mysql_fix_privilege_tables.sql: mysql_system_tables.sql \
111
				mysql_system_tables_fix.sql
112
	@echo "Building $@";
113
	@cat mysql_system_tables.sql mysql_system_tables_fix.sql > $@
114
115
#
116
# Build mysql_fix_privilege_tables_sql.c from
117
# mysql_fix_privileges_tables.sql using comp_sql
118
# The "sleep" ensures the generated file has a younger timestamp than its source
119
# (which may have been generated in this very same "make" run).
120
#
121
mysql_fix_privilege_tables_sql.c: comp_sql.c mysql_fix_privilege_tables.sql
122
	$(MAKE) $(AM_MAKEFLAGS) comp_sql$(EXEEXT)
123
	sleep 2
124
	$(top_builddir)/scripts/comp_sql$(EXEEXT) \
125
	  mysql_fix_privilege_tables \
126
	    $(top_srcdir)/scripts/mysql_fix_privilege_tables.sql $@
127
128
129
SUFFIXES = .sh
130
131
.sh:
132
	@RM@ -f $@ $@-t
133
	@SED@ \
134
	  -e 's!@''bindir''@!$(bindir)!g' \
135
	  -e 's!@''sbindir''@!$(sbindir)!g' \
136
	  -e 's!@''scriptdir''@!$(bindir)!g' \
137
	  -e 's!@''prefix''@!$(prefix)!g' \
138
	  -e 's!@''datadir''@!$(datadir)!g' \
139
	  -e 's!@''localstatedir''@!$(localstatedir)!g' \
140
	  -e 's!@''libexecdir''@!$(libexecdir)!g' \
141
	  -e 's!@''pkglibdir''@!$(pkglibdir)!g' \
142
	  -e 's!@''pkgincludedir''@!$(pkgincludedir)!g' \
143
	  -e 's!@''pkgdatadir''@!$(pkgdatadir)!g' \
144
	  -e 's!@''pkgplugindir''@!$(pkgplugindir)!g' \
145
	  -e 's!@''pkgsuppdir''@!$(pkgsuppdir)!g' \
146
	  -e 's!@''sysconfdir''@!$(sysconfdir)!g' \
147
	  -e 's!@''mandir''@!$(mandir)!g' \
148
	  -e 's!@''infodir''@!$(infodir)!g' \
149
	  -e 's!@''CC''@!@CC@!'\
150
	  -e 's!@''CXX''@!@CXX@!'\
151
	  -e 's!@''GXX''@!@GXX@!'\
152
	  -e 's!@''SAVE_CC''@!@SAVE_CC@!'\
153
	  -e 's!@''SAVE_CXX''@!@SAVE_CXX@!'\
154
	  -e 's!@''CC_VERSION''@!@CC_VERSION@!'\
155
	  -e 's!@''CXX_VERSION''@!@CXX_VERSION@!'\
156
	  -e 's!@''PERL''@!@PERL@!' \
157
	  -e 's!@''SAVE_ASFLAGS''@!@SAVE_ASFLAGS@!'\
158
	  -e 's!@''SAVE_CFLAGS''@!@SAVE_CFLAGS@!'\
159
	  -e 's!@''SAVE_CXXFLAGS''@!@SAVE_CXXFLAGS@!'\
160
	  -e 's!@''SAVE_LDFLAGS''@!@SAVE_LDFLAGS@!'\
161
	  -e 's!@''ASFLAGS''@!@ASFLAGS@!'\
162
	  -e 's!@''CFLAGS''@!@CFLAGS@!'\
163
	  -e 's!@''CXXFLAGS''@!@CXXFLAGS@!'\
164
	  -e 's!@''LDFLAGS''@!@LDFLAGS@!'\
165
	  -e 's!@''CLIENT_LIBS''@!@CLIENT_LIBS@!' \
166
	  -e 's!@''ZLIB_LIBS''@!@ZLIB_LIBS@!' \
167
	  -e 's!@''LIBS''@!@LIBS@!' \
168
	  -e 's!@''WRAPLIBS''@!@WRAPLIBS@!' \
169
	  -e 's!@''innodb_system_libs''@!@innodb_system_libs@!' \
170
	  -e 's!@''openssl_libs''@!@openssl_libs@!' \
171
	  -e 's!@''VERSION''@!@VERSION@!' \
172
	  -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
173
	  -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \
174
	  -e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \
175
	  -e 's!@''MACHINE_TYPE''@!@MACHINE_TYPE@!' \
176
	  -e 's!@''HOSTNAME''@!@HOSTNAME@!' \
177
	  -e 's!@''SYSTEM_TYPE''@!@SYSTEM_TYPE@!' \
178
	  -e 's!@''CHECK_PID''@!@CHECK_PID@!' \
179
	  -e 's!@''FIND_PROC''@!@FIND_PROC@!' \
180
	  -e 's!@''MYSQLD_DEFAULT_SWITCHES''@!@MYSQLD_DEFAULT_SWITCHES@!' \
181
	  -e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \
182
	  -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
183
	  -e 's!@''MYSQL_TCP_PORT_DEFAULT''@!@MYSQL_TCP_PORT_DEFAULT@!' \
184
	  -e 's!@''TARGET_LINUX''@!@TARGET_LINUX@!' \
185
	  -e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \
186
	  -e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \
187
	  -e 's!@''STATIC_NSS_FLAGS''@!@STATIC_NSS_FLAGS@!' \
188
	  -e 's!@''NON_THREADED_LIBS''@!@NON_THREADED_LIBS@!' \
189
	  -e 's!@''ZLIB_DEPS''@!@ZLIB_DEPS@!' \
190
	  -e "s!@MAKE@!$(MAKE)!" \
191
	$< > $@-t
192
	@CHMOD@ +x $@-t
193
	@MV@ $@-t $@
194
195
196
# Don't update the files from bitkeeper
197
%::SCCS/s.%