~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
575.2.2 by Monty Taylor
Moved vio stuff into libdrizzle.
24
SUBDIRS = ${po} . \
815.1.1 by Monty Taylor
Add timegm which is missing on Solaris.
25
	  gnulib \
212.5.4 by Monty Taylor
Renamed strings to mystrings, for include/lib naming consistency.
26
	  mystrings \
187 by Brian Aker
Fixed tab issue
27
	  mysys \
28
	  extra \
779.3.37 by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes
29
	  libdrizzleclient \
187 by Brian Aker
Fixed tab issue
30
	  client \
670.1.8 by Monty Taylor
Fix the serialize build order problem (for now).
31
	  drizzled/serialize \
187 by Brian Aker
Fixed tab issue
32
	  storage \
33
	  plugin \
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
34
	  drizzled \
187 by Brian Aker
Fixed tab issue
35
	  tests \
36
	  support-files
37
815.1.3 by Monty Taylor
Added getopt workaround for broken solaris getopt.
38
EXTRA_DIST = config/config.rpath m4/gnulib-cache.m4
722.1.4 by Monty Taylor
Removed all the setting of DEFS everywhere. Use configmake.h to get the values
39
CLEANFILES = drizzled/configmake.h
187 by Brian Aker
Fixed tab issue
40
DISTCLEANFILES = ac_available_languages_fragment
685.1.2 by Monty Taylor
Put depends on plug.in files into the make process.
41
MAINTAINERCLEANFILES = autom4te.cache
1 by brian
clean slate
42
722.1.4 by Monty Taylor
Removed all the setting of DEFS everywhere. Use configmake.h to get the values
43
BUILT_SOURCES = drizzled/configmake.h
44
noinst_HEADERS = drizzled/configmake.h
45
142.2.1 by Monty Taylor
Fixed Bug#248136 - We create the datadir now on install and chown it to
46
# Create empty datadir 
47
install-data-local:
202.1.24 by Monty Taylor
Changed MKDIR_P to mkinstalldir
48
	$(mkinstalldirs) $(DESTDIR)$(localstatedir) 
187 by Brian Aker
Fixed tab issue
49
	@if test `id -u` = 0 ; then \
579.1.1 by Toru Maesaka
Added tests for groupaad and useradd
50
		if test -n "$(GROUPADD)" && test -n "$(USERADD)"; then \
51
			$(GROUPADD) $(DRIZZLED_USER) ;\
52
			$(USERADD) -g $(DRIZZLED_USER) $(DRIZZLED_USER) ;\
53
			chown $(DRIZZLED_USER) $(DESTDIR)$(localstatedir) ;\
54
		fi \
202.1.24 by Monty Taylor
Changed MKDIR_P to mkinstalldir
55
	fi
142.2.1 by Monty Taylor
Fixed Bug#248136 - We create the datadir now on install and chown it to
56
77.1.106 by Monty Taylor
Another batch of distclean fixes.
57
187 by Brian Aker
Fixed tab issue
58
.PHONY: test \
59
    test-force \
60
    test-full \
61
    test-force-full \
62
    test-force-mem \
63
    test-pl \
64
    test-force-pl \
65
    test-full-pl \
66
    test-force-full-pl \
67
    test-force-pl-mem \
68
    test-ps test-nr \
69
    test-pr test-ns \
70
    test-binlog-statement \
71
    test-ext-funcs \
72
    test-ext-rpl \
73
    test-ext-jp \
74
    test-ext-stress \
75
    test-ext \
76
    test-fast \
77
    test-fast-cursor \
78
    test-fast-view \
656.1.11 by Monty Taylor
Added indent rule and uncrustify config.
79
    test-full-qa \
80
    indent
1 by brian
clean slate
81
82
# Target 'test' will run the regression test suite using the built server.
83
#
84
# If you are running in a shared environment, users can avoid clashing
85
# port numbers by setting individual small numbers 1-100 to the
168 by Brian Aker
Rename of test (better tab completion!)
86
# environment variable MTR_BUILD_THREAD. The script "test-run"
1 by brian
clean slate
87
# will then calculate the various port numbers it needs from this,
88
# making sure each user use different ports.
89
90
test-nr:
187 by Brian Aker
Fixed tab issue
91
	cd tests ; \
92
	  ./test-run $(force) --mysqld=--binlog-format=row
1 by brian
clean slate
93
94
test-ns:
187 by Brian Aker
Fixed tab issue
95
	cd tests ; \
96
	  ./test-run $(force) $(mem) --mysqld=--binlog-format=mixed
1 by brian
clean slate
97
98
test-binlog-statement:
187 by Brian Aker
Fixed tab issue
99
	cd tests ; \
100
	  ./test-run $(force) --mysqld=--binlog-format=statement
1 by brian
clean slate
101
53.2.5 by Monty Taylor
Add Jay's test optoins at the target of make test.
102
test: test-drizzle
103
104
test-drizzle:
187 by Brian Aker
Fixed tab issue
105
	cd tests ; \
236.1.22 by Monty Taylor
A couple of changes to move the actual test code to the tests dir and attempt
106
	$(MAKE) $(AM_MAKEFLAGS) test 
264.3.1 by Jay Pipes
* Added Doxyfile configuration for doxygen builds
107
108
doxygen:
109
	doxygen Doxyfile
656.1.11 by Monty Taylor
Added indent rule and uncrustify config.
110
111
indent:
112
	for f in `find ${top_srcdir} -type f | grep -v innobase |\
113
                  ${EGREP} '\.(cc|c|h)$$' ` ; do \
114
            uncrustify -f $$f -c ${top_srcdir}/config/uncrustify.cfg \
115
               -o indentoutput.tmp && mv indentoutput.tmp "$$f" ;\
116
        done
722.1.4 by Monty Taylor
Removed all the setting of DEFS everywhere. Use configmake.h to get the values
117
118
drizzled/configmake.h: ${top_srcdir}/Makefile.in
119
	@echo "Making $@"
120
	@rm -f $@-t $@
121
	@{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
122
	  echo '#define PREFIX "$(prefix)"'; \
123
	  echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
124
	  echo '#define BINDIR "$(bindir)"'; \
125
	  echo '#define SBINDIR "$(sbindir)"'; \
126
	  echo '#define LIBEXECDIR "$(libexecdir)"'; \
127
	  echo '#define DATAROOTDIR "$(datarootdir)"'; \
128
	  echo '#define DATADIR "$(datadir)"'; \
129
	  echo '#define SYSCONFDIR "$(sysconfdir)"'; \
130
	  echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
131
	  echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
132
	  echo '#define INCLUDEDIR "$(includedir)"'; \
133
	  echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
134
	  echo '#define DOCDIR "$(docdir)"'; \
135
	  echo '#define INFODIR "$(infodir)"'; \
136
	  echo '#define HTMLDIR "$(htmldir)"'; \
137
	  echo '#define DVIDIR "$(dvidir)"'; \
138
	  echo '#define PDFDIR "$(pdfdir)"'; \
139
	  echo '#define PSDIR "$(psdir)"'; \
140
	  echo '#define LIBDIR "$(libdir)"'; \
141
	  echo '#define LISPDIR "$(lispdir)"'; \
142
	  echo '#define LOCALEDIR "$(localedir)"'; \
143
	  echo '#define MANDIR "$(mandir)"'; \
144
	  echo '#define MANEXT "$(manext)"'; \
145
	  echo '#define PKGDATADIR "$(pkgdatadir)"'; \
146
	  echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
147
	  echo '#define PKGLIBDIR "$(pkglibdir)"'; \
148
	  echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
149
	  echo '#define PKGPLUGINDIR "$(pkgplugindir)"'; \
150
	} | sed '/""/d' > $@-t
151
	@if diff $@-t $@ >/dev/null 2>&1 ; then \
152
	  rm @-t ; \
153
	else \
154
	  mv $@-t $@ ; \
155
	fi
156
779.1.25 by Monty Taylor
Put in LCOV checks. Put output in subdir.
157
if HAVE_LCOV
158
779.1.20 by Monty Taylor
Added lcov commands.
159
lcov: lcov-clean test index.html
160
779.1.25 by Monty Taylor
Put in LCOV checks. Put output in subdir.
161
lcov/drizzle.output: drizzled/drizzled
162
	mkdir -p lcov
163
	${LCOV} --directory ${top_srcdir}/lcov --capture --output-file lcov/drizzle.output
779.1.20 by Monty Taylor
Added lcov commands.
164
779.1.25 by Monty Taylor
Put in LCOV checks. Put output in subdir.
165
lcov/index.html: lcov/drizzle.output
166
	${GENHTML} -o lcov lcov/drizzle.output
779.1.20 by Monty Taylor
Added lcov commands.
167
168
lcov-clean:
169
	ln -fs pars/pars0lex.l ${top_srcdir}/storage/innobase/pars0lex.l
170
	ln -fs pars/lexyy.c ${top_srcdir}/storage/innobase/lexyy.c
171
	ln -fs pars/pars0grm.c ${top_srcdir}/storage/innobase/pars0grm.c
172
	ln -fs pars/pars0grm.y ${top_srcdir}/storage/innobase/pars0grm.y
173
779.1.25 by Monty Taylor
Put in LCOV checks. Put output in subdir.
174
	${LCOV} --directory ${top_srcdir} --zerocounters
779.1.20 by Monty Taylor
Added lcov commands.
175
779.1.25 by Monty Taylor
Put in LCOV checks. Put output in subdir.
176
endif