~drizzle-trunk/drizzle/development

992.1.25 by Monty Taylor
Moved myisam to new plugin system.
1
#  Copyright (C) 2009 Sun Microsystems
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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
1 by brian
clean slate
15
722.2.9 by Monty Taylor
I _think_ I've got the plug.in triggering rebuild thing going on right.
16
ACLOCAL_AMFLAGS = -I m4 --force
475 by Monty Taylor
Added m4 files for deficient systems. Changed include mechanism to not need
17
1 by brian
clean slate
18
# Process this file with automake to create Makefile.in
312.1.8 by Monty Taylor
Don't build po dir if we don't have gettext.
19
if BUILD_GETTEXT
20
  po=po
21
endif
1 by brian
clean slate
22
992.1.15 by Monty Taylor
Moved mysys build into root Makefile.
23
SUBDIRS = ${po} \
815.1.1 by Monty Taylor
Add timegm which is missing on Solaris.
24
	  gnulib \
992.1.17 by Monty Taylor
Moved extra/ into root Makefile.am
25
	  drizzled/message \
992.1.15 by Monty Taylor
Moved mysys build into root Makefile.
26
	  . \
187 by Brian Aker
Fixed tab issue
27
	  storage \
28
	  plugin \
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
29
	  drizzled \
187 by Brian Aker
Fixed tab issue
30
	  tests \
31
	  support-files
32
992.1.15 by Monty Taylor
Moved mysys build into root Makefile.
33
BUILT_SOURCES=		drizzled/configmake.h
992.1.21 by Monty Taylor
First pass at replacing plugin.m4.
34
EXTRA_DIST=		config/config.rpath m4/gnulib-cache.m4 \
35
			config/plugin.ac config/plugin.am
992.1.18 by Monty Taylor
Moved client build into root Makefile.
36
CLEANFILES=		${BUILT_SOURCES}
37
DISTCLEANFILES=		ac_available_languages_fragment
38
MAINTAINERCLEANFILES=	autom4te.cache
39
40
CLIENT_LDADD=		mysys/libmysys.la \
41
			mystrings/libmystrings.la \
42
			$(LIBDRIZZLE) $(LIBINTL) $(LIBZ) \
43
			client/libgetpassword.la
44
45
noinst_LTLIBRARIES= \
46
		client/libgetpassword.la \
47
		mysys/libmysys.la \
48
		mystrings/libmystrings.la
992.1.15 by Monty Taylor
Moved mysys build into root Makefile.
49
992.1.29 by Monty Taylor
Migrated archive.
50
noinst_PROGRAMS=
992.1.17 by Monty Taylor
Moved extra/ into root Makefile.am
51
nobase_bin_PROGRAMS= \
992.1.18 by Monty Taylor
Moved client build into root Makefile.
52
		client/drizzle \
53
		client/drizzlecheck \
54
		client/drizzledump \
55
		client/drizzleimport \
56
		client/drizzletest \
57
		client/drizzleslap \
992.1.17 by Monty Taylor
Moved extra/ into root Makefile.am
58
		extra/my_print_defaults \
59
		extra/mysql_waitpid \
60
		extra/innochecksum
61
992.1.18 by Monty Taylor
Moved client build into root Makefile.
62
63
client_libgetpassword_la_SOURCES= client/get_password.cc
64
992.1.15 by Monty Taylor
Moved mysys build into root Makefile.
65
noinst_HEADERS=	\
992.1.18 by Monty Taylor
Moved client build into root Makefile.
66
		client/client_priv.h \
992.1.27 by Monty Taylor
Added some missing backslashes.
67
		client/errname.h \
992.1.18 by Monty Taylor
Moved client build into root Makefile.
68
		client/get_password.h \
69
		client/my_readline.h \
992.1.15 by Monty Taylor
Moved mysys build into root Makefile.
70
		drizzled/configmake.h \
992.1.16 by Monty Taylor
Moved mystrings build into root Makefile.
71
		mystrings/decimal.h \
72
		mystrings/m_ctype.h \
73
		mystrings/m_string.h \
74
		mystrings/my_uctype.h \
992.1.27 by Monty Taylor
Added some missing backslashes.
75
		mystrings/t_ctype.h \
76
		mystrings/utf8.h \
992.1.15 by Monty Taylor
Moved mysys build into root Makefile.
77
		mysys/aio_result.h \
78
		mysys/base64.h \
79
		mysys/definitions.h \
80
		mysys/drizzle_time.h \
81
		mysys/hash.h \
82
		mysys/iocache.h \
83
		mysys/my_alloc.h \
84
		mysys/my_bit.h \
85
		mysys/my_bitmap.h \
86
		mysys/my_dir.h \
87
		mysys/my_getopt.h \
88
		mysys/my_pthread.h \
89
		mysys/my_static.h \
90
		mysys/my_sys.h \
91
		mysys/my_time.h \
92
		mysys/my_tree.h \
93
		mysys/mysys_err.h \
94
		mysys/mysys_priv.h \
95
		mysys/sha1.h \
96
		mysys/thr_lock.h \
97
		mysys/typelib.h
98
992.1.16 by Monty Taylor
Moved mystrings build into root Makefile.
99
mystrings_libmystrings_la_SOURCES= \
100
		mystrings/bmove_upp.cc \
101
		mystrings/ctype-bin.cc \
102
		mystrings/ctype-extra.cc \
103
		mystrings/ctype-mb.cc \
104
		mystrings/ctype-simple.cc \
105
		mystrings/ctype-uca.cc \
106
		mystrings/ctype-utf8.cc \
107
		mystrings/ctype.cc \
108
		mystrings/decimal.cc \
109
		mystrings/dtoa.cc \
110
		mystrings/int2str.cc \
111
		mystrings/is_prefix.cc \
112
		mystrings/llstr.cc \
113
		mystrings/longlong2str.cc \
114
		mystrings/my_strtoll10.cc \
115
		mystrings/str2int.cc
116
992.1.15 by Monty Taylor
Moved mysys build into root Makefile.
117
mysys_libmysys_la_SOURCES= \
118
		mysys/array.cc \
119
		mysys/base64.cc \
120
		mysys/charset-def.cc \
121
		mysys/charset.cc \
122
		mysys/checksum.cc \
123
		mysys/default.cc \
124
		mysys/default_modify.cc \
125
		mysys/errors.cc \
126
		mysys/hash.cc \
127
		mysys/mf_arr_appstr.cc \
128
		mysys/mf_cache.cc \
129
		mysys/mf_dirname.cc \
130
		mysys/mf_fn_ext.cc \
131
		mysys/mf_format.cc \
132
		mysys/mf_getdate.cc \
133
		mysys/mf_iocache.cc \
134
		mysys/mf_iocache2.cc \
135
		mysys/mf_loadpath.cc \
136
		mysys/mf_pack.cc \
137
		mysys/mf_qsort.cc \
138
		mysys/mf_qsort2.cc \
139
		mysys/mf_radix.cc \
140
		mysys/mf_same.cc \
141
		mysys/mf_sort.cc \
142
		mysys/mf_tempfile.cc \
143
		mysys/mf_wcomp.cc \
144
		mysys/mulalloc.cc \
145
		mysys/my_access.cc \
146
		mysys/my_alloc.cc \
147
		mysys/my_bit.cc \
148
		mysys/my_bitmap.cc \
149
		mysys/my_copy.cc \
150
		mysys/my_create.cc \
151
		mysys/my_delete.cc \
152
		mysys/my_dup.cc \
153
		mysys/my_error.cc \
154
		mysys/my_file.cc \
155
		mysys/my_filename.cc \
156
		mysys/my_getopt.cc \
157
		mysys/my_getsystime.cc \
158
		mysys/my_init.cc \
159
		mysys/my_lib.cc \
160
		mysys/my_open.cc \
161
		mysys/my_read.cc \
162
		mysys/my_redel.cc \
163
		mysys/my_rename.cc \
164
		mysys/my_static.cc \
165
		mysys/my_symlink.cc \
166
		mysys/my_symlink2.cc \
167
		mysys/my_sync.cc \
168
		mysys/my_thr_init.cc \
169
		mysys/my_time.cc \
170
		mysys/my_write.cc \
171
		mysys/ptr_cmp.cc \
172
		mysys/sha1.cc \
173
		mysys/thr_lock.cc \
174
		mysys/tree.cc \
175
		mysys/typelib.cc
722.1.4 by Monty Taylor
Removed all the setting of DEFS everywhere. Use configmake.h to get the values
176
992.1.18 by Monty Taylor
Moved client build into root Makefile.
177
client_drizzle_SOURCES=		client/drizzle.cc client/readline.cc
178
client_drizzle_LDADD=		${CLIENT_LDADD} ${READLINE_LIBS}
179
180
client_drizzlecheck_SOURCES =	client/drizzlecheck.cc
181
client_drizzlecheck_LDADD=	${CLIENT_LDADD}
182
183
client_drizzledump_SOURCES=	client/drizzledump.cc
184
client_drizzledump_LDADD=	${CLIENT_LDADD}
185
186
client_drizzleimport_SOURCES=	client/drizzleimport.cc
187
client_drizzleimport_LDADD=	${CLIENT_LDADD}
188
189
client_drizzleslap_SOURCES=	client/drizzleslap.cc
190
client_drizzleslap_LDADD=	${CLIENT_LDADD}
191
192
client_drizzletest_SOURCES=	client/drizzletest.cc
193
client_drizzletest_LDADD=	${CLIENT_LDADD} ${LIBPCRE}
194
992.1.17 by Monty Taylor
Moved extra/ into root Makefile.am
195
extra_my_print_defaults_SOURCES= extra/my_print_defaults.cc
196
extra_my_print_defaults_LDADD= \
197
		$(top_builddir)/mysys/libmysys.la \
198
		$(top_builddir)/mystrings/libmystrings.la \
199
		$(LIBINTL)
200
extra_mysql_waitpid_SOURCES= extra/mysql_waitpid.cc
201
extra_mysql_waitpid_LDADD= \
202
		$(top_builddir)/mysys/libmysys.la \
203
		$(top_builddir)/mystrings/libmystrings.la \
204
		$(LIBINTL)
205
992.1.21 by Monty Taylor
First pass at replacing plugin.m4.
206
EXTRA_LTLIBRARIES=
207
pkgplugin_LTLIBRARIES=
208
include config/plugin.am
209
142.2.1 by Monty Taylor
Fixed Bug#248136 - We create the datadir now on install and chown it to
210
# Create empty datadir 
211
install-data-local:
202.1.24 by Monty Taylor
Changed MKDIR_P to mkinstalldir
212
	$(mkinstalldirs) $(DESTDIR)$(localstatedir) 
187 by Brian Aker
Fixed tab issue
213
	@if test `id -u` = 0 ; then \
579.1.1 by Toru Maesaka
Added tests for groupaad and useradd
214
		if test -n "$(GROUPADD)" && test -n "$(USERADD)"; then \
215
			$(GROUPADD) $(DRIZZLED_USER) ;\
216
			$(USERADD) -g $(DRIZZLED_USER) $(DRIZZLED_USER) ;\
217
			chown $(DRIZZLED_USER) $(DESTDIR)$(localstatedir) ;\
218
		fi \
202.1.24 by Monty Taylor
Changed MKDIR_P to mkinstalldir
219
	fi
142.2.1 by Monty Taylor
Fixed Bug#248136 - We create the datadir now on install and chown it to
220
77.1.106 by Monty Taylor
Another batch of distclean fixes.
221
187 by Brian Aker
Fixed tab issue
222
.PHONY: test \
223
    test-force \
224
    test-full \
225
    test-force-full \
226
    test-force-mem \
227
    test-pl \
228
    test-force-pl \
229
    test-full-pl \
230
    test-force-full-pl \
231
    test-force-pl-mem \
232
    test-ps test-nr \
233
    test-pr test-ns \
234
    test-binlog-statement \
235
    test-ext-funcs \
236
    test-ext-rpl \
237
    test-ext-jp \
238
    test-ext-stress \
239
    test-ext \
240
    test-fast \
241
    test-fast-cursor \
242
    test-fast-view \
656.1.11 by Monty Taylor
Added indent rule and uncrustify config.
243
    test-full-qa \
244
    indent
1 by brian
clean slate
245
246
# Target 'test' will run the regression test suite using the built server.
247
#
248
# If you are running in a shared environment, users can avoid clashing
249
# port numbers by setting individual small numbers 1-100 to the
168 by Brian Aker
Rename of test (better tab completion!)
250
# environment variable MTR_BUILD_THREAD. The script "test-run"
1 by brian
clean slate
251
# will then calculate the various port numbers it needs from this,
252
# making sure each user use different ports.
253
254
test-nr:
187 by Brian Aker
Fixed tab issue
255
	cd tests ; \
256
	  ./test-run $(force) --mysqld=--binlog-format=row
1 by brian
clean slate
257
258
test-ns:
187 by Brian Aker
Fixed tab issue
259
	cd tests ; \
260
	  ./test-run $(force) $(mem) --mysqld=--binlog-format=mixed
1 by brian
clean slate
261
262
test-binlog-statement:
187 by Brian Aker
Fixed tab issue
263
	cd tests ; \
264
	  ./test-run $(force) --mysqld=--binlog-format=statement
1 by brian
clean slate
265
53.2.5 by Monty Taylor
Add Jay's test optoins at the target of make test.
266
test: test-drizzle
267
268
test-drizzle:
187 by Brian Aker
Fixed tab issue
269
	cd tests ; \
942.1.4 by Monty Taylor
Moved big tests to big suite. Added make target "make test-big" to allow for easy running of the big tests.
270
	$(MAKE) $(AM_MAKEFLAGS) test-drizzle
271
272
test-big:
273
	cd tests ; \
274
	$(MAKE) $(AM_MAKEFLAGS) test-big
264.3.1 by Jay Pipes
* Added Doxyfile configuration for doxygen builds
275
276
doxygen:
277
	doxygen Doxyfile
656.1.11 by Monty Taylor
Added indent rule and uncrustify config.
278
279
indent:
280
	for f in `find ${top_srcdir} -type f | grep -v innobase |\
281
                  ${EGREP} '\.(cc|c|h)$$' ` ; do \
282
            uncrustify -f $$f -c ${top_srcdir}/config/uncrustify.cfg \
283
               -o indentoutput.tmp && mv indentoutput.tmp "$$f" ;\
284
        done
722.1.4 by Monty Taylor
Removed all the setting of DEFS everywhere. Use configmake.h to get the values
285
286
drizzled/configmake.h: ${top_srcdir}/Makefile.in
287
	@echo "Making $@"
288
	@rm -f $@-t $@
289
	@{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
290
	  echo '#define PREFIX "$(prefix)"'; \
291
	  echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
292
	  echo '#define BINDIR "$(bindir)"'; \
293
	  echo '#define SBINDIR "$(sbindir)"'; \
294
	  echo '#define LIBEXECDIR "$(libexecdir)"'; \
295
	  echo '#define DATAROOTDIR "$(datarootdir)"'; \
296
	  echo '#define DATADIR "$(datadir)"'; \
297
	  echo '#define SYSCONFDIR "$(sysconfdir)"'; \
298
	  echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
299
	  echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
300
	  echo '#define INCLUDEDIR "$(includedir)"'; \
301
	  echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
302
	  echo '#define DOCDIR "$(docdir)"'; \
303
	  echo '#define INFODIR "$(infodir)"'; \
304
	  echo '#define HTMLDIR "$(htmldir)"'; \
305
	  echo '#define DVIDIR "$(dvidir)"'; \
306
	  echo '#define PDFDIR "$(pdfdir)"'; \
307
	  echo '#define PSDIR "$(psdir)"'; \
308
	  echo '#define LIBDIR "$(libdir)"'; \
309
	  echo '#define LISPDIR "$(lispdir)"'; \
310
	  echo '#define LOCALEDIR "$(localedir)"'; \
311
	  echo '#define MANDIR "$(mandir)"'; \
312
	  echo '#define MANEXT "$(manext)"'; \
313
	  echo '#define PKGDATADIR "$(pkgdatadir)"'; \
314
	  echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
315
	  echo '#define PKGLIBDIR "$(pkglibdir)"'; \
316
	  echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
317
	  echo '#define PKGPLUGINDIR "$(pkgplugindir)"'; \
318
	} | sed '/""/d' > $@-t
319
	@if diff $@-t $@ >/dev/null 2>&1 ; then \
320
	  rm @-t ; \
321
	else \
322
	  mv $@-t $@ ; \
323
	fi
324
779.1.25 by Monty Taylor
Put in LCOV checks. Put output in subdir.
325
if HAVE_LCOV
326
873.2.36 by Monty Taylor
Fix to clean up flags.
327
lcov: lcov-clean test lcov/index.html
779.1.20 by Monty Taylor
Added lcov commands.
328
779.1.25 by Monty Taylor
Put in LCOV checks. Put output in subdir.
329
lcov/drizzle.output: drizzled/drizzled
330
	mkdir -p lcov
331
	${LCOV} --directory ${top_srcdir}/lcov --capture --output-file lcov/drizzle.output
779.1.20 by Monty Taylor
Added lcov commands.
332
779.1.25 by Monty Taylor
Put in LCOV checks. Put output in subdir.
333
lcov/index.html: lcov/drizzle.output
334
	${GENHTML} -o lcov lcov/drizzle.output
779.1.20 by Monty Taylor
Added lcov commands.
335
336
lcov-clean:
337
	ln -fs pars/pars0lex.l ${top_srcdir}/storage/innobase/pars0lex.l
338
	ln -fs pars/lexyy.c ${top_srcdir}/storage/innobase/lexyy.c
339
	ln -fs pars/pars0grm.c ${top_srcdir}/storage/innobase/pars0grm.c
340
	ln -fs pars/pars0grm.y ${top_srcdir}/storage/innobase/pars0grm.y
341
779.1.25 by Monty Taylor
Put in LCOV checks. Put output in subdir.
342
	${LCOV} --directory ${top_srcdir} --zerocounters
779.1.20 by Monty Taylor
Added lcov commands.
343
779.1.25 by Monty Taylor
Put in LCOV checks. Put output in subdir.
344
endif