~drizzle-trunk/drizzle/development

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