summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.(none)>2004-05-27 07:04:45 +0000
committerunknown <tomas@poseidon.(none)>2004-05-27 07:04:45 +0000
commitc41b0e48c9bf6b6ac4a574261b9f09905484b106 (patch)
tree90c3cd703ab050cc2aaca70e8722bfc4d782a713
parent34e7ad059a88574c0f69a3f444f0fede168b8a5d (diff)
downloadmariadb-git-c41b0e48c9bf6b6ac4a574261b9f09905484b106.tar.gz
several ndb automake changes, see respective file
ndb/tools/waiter.cpp: Rename: ndb/test/tools/waiter.cpp -> ndb/tools/waiter.cpp configure.in: added install dirs for ndb ndb/Makefile.am: ndb headers for install ndb/config/common.mk.am: DEFS_LOC in ndb make ndb/config/type_ndbapi.mk.am: added LDADD=libNDB_API.la default for type_ndbapi ndb/src/cw/cpcd/Makefile.am: changes install dir ndb/src/kernel/blocks/backup/restore/Makefile.am: changes install dir ndb/src/kernel/ndb-main/Makefile.am: changes install dir ndb/src/mgmapi/Makefile.am: changes install dir ndb/src/mgmclient/Makefile.am: changes install dir ndb/src/mgmsrv/Makefile.am: changes install dir ndb/src/ndbapi/Makefile.am: changes install dir ndb/test/ndbapi/Makefile.am: changes install dir ndb/test/ndbapi/bank/Makefile.am: changes install dir ndb/test/tools/Makefile.am: changes install dir mysql-test/ndb/install_ndbcluster.sh: new mysql-test/ndb/stop_ndbcluster.sh: new ndb/tools/Makefile.am: changes install dir
-rw-r--r--configure.in31
-rw-r--r--mysql-test/ndb/Makefile.am27
-rwxr-xr-xmysql-test/ndb/install_ndbcluster.sh (renamed from mysql-test/ndb/install_ndbcluster)27
-rwxr-xr-xmysql-test/ndb/stop_ndbcluster.sh (renamed from mysql-test/ndb/stop_ndbcluster)12
-rw-r--r--ndb/Makefile.am28
-rw-r--r--ndb/config/common.mk.am2
-rw-r--r--ndb/config/type_ndbapi.mk.am1
-rw-r--r--ndb/src/cw/cpcd/Makefile.am2
-rw-r--r--ndb/src/kernel/blocks/backup/restore/Makefile.am2
-rw-r--r--ndb/src/kernel/ndb-main/Makefile.am2
-rw-r--r--ndb/src/mgmapi/Makefile.am8
-rw-r--r--ndb/src/mgmclient/Makefile.am2
-rw-r--r--ndb/src/mgmsrv/Makefile.am14
-rw-r--r--ndb/src/ndbapi/Makefile.am2
-rw-r--r--ndb/test/ndbapi/Makefile.am2
-rw-r--r--ndb/test/ndbapi/bank/Makefile.am2
-rw-r--r--ndb/test/tools/Makefile.am3
-rw-r--r--ndb/tools/Makefile.am3
-rw-r--r--ndb/tools/waiter.cpp (renamed from ndb/test/tools/waiter.cpp)0
19 files changed, 136 insertions, 34 deletions
diff --git a/configure.in b/configure.in
index e4cdf1db535..b7ce1ad74f2 100644
--- a/configure.in
+++ b/configure.in
@@ -2837,6 +2837,35 @@ then
CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS)"
fi
+ndbbindir_root="\$(prefix)"
+ndbbindir="\$(ndbbindir_root)/ndb/bin"
+AC_SUBST(ndbbindir_root)
+AC_SUBST(ndbbindir)
+ndbtoolsdir_root="\$(prefix)"
+ndbtoolsdir="\$(ndbtoolsdir_root)/ndb/tools"
+AC_SUBST(ndbtoolsdir_root)
+AC_SUBST(ndbtoolsdir)
+ndblibdir_root="\$(prefix)"
+ndblibdir="\$(ndblibdir_root)/ndb/lib"
+AC_SUBST(ndblibdir_root)
+AC_SUBST(ndblibdir)
+ndbtestdir_root="\$(prefix)"
+ndbtestdir="\$(ndbtestdir_root)/ndb/test"
+AC_SUBST(ndbtestdir_root)
+AC_SUBST(ndbtestdir)
+ndbincludedir_root="\$(prefix)"
+ndbincludedir="\$(ndbincludedir_root)/ndb/include"
+AC_SUBST(ndbincludedir_root)
+AC_SUBST(ndbincludedir)
+ndbapiincludedir_root="\$(prefix)"
+ndbapiincludedir="\$(ndbapiincludedir_root)/ndb/include/ndbapi"
+AC_SUBST(ndbapiincludedir_root)
+AC_SUBST(ndbapiincludedir)
+mgmapiincludedir_root="\$(prefix)"
+mgmapiincludedir="\$(mgmapiincludedir_root)/ndb/include/mgmapi"
+AC_SUBST(mgmapiincludedir_root)
+AC_SUBST(mgmapiincludedir)
+
NDB_UTIL_INCLUDES="-I\$(srcdir) -I\$(top_srcdir)/include -I\$(top_srcdir)/ndb/include \
-I\$(top_srcdir)/ndb/include/util \
-I\$(top_srcdir)/ndb/include/portlib \
@@ -2958,7 +2987,7 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl
merge/Makefile dbug/Makefile scripts/Makefile dnl
include/Makefile sql-bench/Makefile tools/Makefile dnl
tests/Makefile Docs/Makefile support-files/Makefile dnl
- support-files/MacOSX/Makefile mysql-test/Makefile dnl
+ support-files/MacOSX/Makefile mysql-test/Makefile mysql-test/ndb/Makefile dnl
netware/Makefile dnl
include/mysql_version.h dnl
cmd-line-utils/Makefile dnl
diff --git a/mysql-test/ndb/Makefile.am b/mysql-test/ndb/Makefile.am
new file mode 100644
index 00000000000..9ab785346da
--- /dev/null
+++ b/mysql-test/ndb/Makefile.am
@@ -0,0 +1,27 @@
+
+benchdir_root= $(prefix)
+testdir = $(benchdir_root)/mysql-test/ndb
+
+test_SCRIPTS = \
+install_ndbcluster \
+stop_ndbcluster
+
+EXTRA_SCRIPTS = \
+install_ndbcluster.sh \
+stop_ndbcluster.sh
+
+test_DATA = ndb_config_2_node.ini
+
+SUFFIXES = .sh
+
+.sh:
+ @RM@ -f $@ $@-t
+ @SED@ \
+ -e 's!@''ndbbindir''@!$(ndbbindir)!g' \
+ -e 's!@''ndbtoolsdir''@!$(ndbtoolsdir)!g' \
+ $< > $@-t
+ @CHMOD@ +x $@-t
+ @MV@ $@-t $@
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/mysql-test/ndb/install_ndbcluster b/mysql-test/ndb/install_ndbcluster.sh
index 6cb3985b831..acd3b54be8f 100755
--- a/mysql-test/ndb/install_ndbcluster
+++ b/mysql-test/ndb/install_ndbcluster.sh
@@ -9,8 +9,22 @@ port_base="22" # using ports port_base{"00","01", etc}
fsdir=`pwd`
# end configurable parameters
-libdir=`pwd`/../ndb/lib
-bindir=`pwd`/../ndb/bin
+# Are we using a source or a binary distribution?
+
+if [ -d ../sql ] ; then
+ SOURCE_DIST=1
+ ndbtop=../ndb
+ exec_ndb=$ndbtop/src/kernel/ndb-main/ndb
+ exec_mgmtsrvr=$ndbtop/src/mgmsrv/mgmtsrvr
+ exec_waiter=$ndbtop/tools/ndbwaiter
+ exec_mgmtclient=$ndbtop/src/mgmclient/mgmtclient
+else
+ BINARY_DIST=1
+ exec_ndb=@ndbbindir@/ndb
+ exec_mgmtsrvr=@ndbbindir@/mgmtsrvr
+ exec_waiter=@ndbtoolsdir@/waiter
+ exec_mgmtclient=@ndbbindir@/mgmtclient
+fi
pidfile=ndbcluster.pid
@@ -33,8 +47,6 @@ while test $# -gt 0; do
shift
done
-exec_ndb=$bindir/ndb
-exec_mgmtsrvr=$bindir/mgmtsrvr
fs_ndb=$fsdir/ndbcluster
fs_mgm_1=$fs_ndb/1.ndb_mgm
fs_ndb_2=$fs_ndb/2.ndb_db
@@ -125,15 +137,14 @@ cat `find $fs_ndb -name 'node*.pid'` > $pidfile
# Start management client
-sleep 5
-echo "show" | $bindir/mgmtclient $ndb_host $ndb_port
+sleep 10
+echo "show" | $exec_mgmtclient $ndb_host $ndb_port
# test if Ndb Cluster starts properly
NDB_ID="11"
NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID
-#if ( export LD_LIBRARY_PATH=$libdir ; $bindir/list_tables ) | grep "NDBT_ProgramExit: 0 - OK"; then :; else
-if ( export LD_LIBRARY_PATH=$libdir ; $bindir/waiter ) | grep "NDBT_ProgramExit: 0 - OK"; then :; else
+if ( $exec_waiter ) | grep "NDBT_ProgramExit: 0 - OK"; then :; else
echo "Ndbcluster startup failed"
exit 1
fi
diff --git a/mysql-test/ndb/stop_ndbcluster b/mysql-test/ndb/stop_ndbcluster.sh
index e1a98f1de07..bb137c54c81 100755
--- a/mysql-test/ndb/stop_ndbcluster
+++ b/mysql-test/ndb/stop_ndbcluster.sh
@@ -4,7 +4,15 @@
# This scripts stops the table handler ndbcluster
-bindir=`pwd`/../ndb/bin
+if [ -d ../sql ] ; then
+ SOURCE_DIST=1
+ ndbtop=../ndb
+ exec_mgmtclient=$ndbtop/src/mgmclient/mgmtclient
+else
+ BINARY_DIST=1
+ exec_mgmtclient=@ndbbindir@/mgmtclient
+fi
+
pidfile=ndbcluster.pid
cfgfile=Ndb.cfg
@@ -36,7 +44,7 @@ ndb_port=`cat $cfgfile | sed -e "s,.*host=$ndb_host\:\([0-9]*\).*,\1,1"`
# Start management client
-exec_mgmtclient="$bindir/mgmtclient --try-reconnect=1 $ndb_host $ndb_port"
+exec_mgmtclient="$exec_mgmtclient --try-reconnect=1 $ndb_host $ndb_port"
echo "$exec_mgmtclient"
echo "all stop" | $exec_mgmtclient
diff --git a/ndb/Makefile.am b/ndb/Makefile.am
index a18f83fcf29..c83c9f1fa48 100644
--- a/ndb/Makefile.am
+++ b/ndb/Makefile.am
@@ -3,4 +3,32 @@
SUBDIRS = . include src test tools
+ndbinclude_HEADERS = \
+include/ndb_types.h \
+include/ndb_version.h
+
+ndbapiinclude_HEADERS = \
+include/ndbapi/ndbapi_limits.h \
+include/ndbapi/Ndb.hpp \
+include/ndbapi/NdbApi.hpp \
+include/ndbapi/NdbConnection.hpp \
+include/ndbapi/NdbCursorOperation.hpp \
+include/ndbapi/NdbDictionary.hpp \
+include/ndbapi/NdbError.hpp \
+include/ndbapi/NdbEventOperation.hpp \
+include/ndbapi/NdbIndexOperation.hpp \
+include/ndbapi/NdbOperation.hpp \
+include/ndbapi/NdbPool.hpp \
+include/ndbapi/NdbRecAttr.hpp \
+include/ndbapi/NdbReceiver.hpp \
+include/ndbapi/NdbResultSet.hpp \
+include/ndbapi/NdbScanFilter.hpp \
+include/ndbapi/NdbScanOperation.hpp \
+include/ndbapi/NdbSchemaCon.hpp \
+include/ndbapi/NdbSchemaOp.hpp
+
+mgmapiinclude_HEADERS = \
+include/mgmapi/mgmapi.h \
+include/mgmapi/mgmapi_debug.h
+
noinst_HEADERS =
diff --git a/ndb/config/common.mk.am b/ndb/config/common.mk.am
index f8d0882ac00..cc320120b2a 100644
--- a/ndb/config/common.mk.am
+++ b/ndb/config/common.mk.am
@@ -1,7 +1,7 @@
INCLUDES = $(INCLUDES_LOC)
LDADD = $(top_srcdir)/ndb/src/common/portlib/gcc.cpp $(LDADD_LOC)
-DEFS = @DEFS@ @NDB_DEFS@
+DEFS = @DEFS@ @NDB_DEFS@ $(DEFS_LOC)
# ndb cannot be compiled with -fno-implicit-templaces
NDB_CXXFLAGS=-fimplicit-templates
##use AM_CXXFLAGS for other flags
diff --git a/ndb/config/type_ndbapi.mk.am b/ndb/config/type_ndbapi.mk.am
index 864690cec7b..a9c98f3f6e6 100644
--- a/ndb/config/type_ndbapi.mk.am
+++ b/ndb/config/type_ndbapi.mk.am
@@ -1,2 +1,3 @@
INCLUDES += @NDB_NDBAPI_INCLUDES@
+LDADD += $(top_srcdir)/ndb/src/ndbapi/libNDB_API.la
diff --git a/ndb/src/cw/cpcd/Makefile.am b/ndb/src/cw/cpcd/Makefile.am
index 029ce213987..0d38f4ca536 100644
--- a/ndb/src/cw/cpcd/Makefile.am
+++ b/ndb/src/cw/cpcd/Makefile.am
@@ -1,5 +1,5 @@
-bin_PROGRAMS = ndb_cpcd
+ndbtools_PROGRAMS = ndb_cpcd
ndb_cpcd_SOURCES = main.cpp CPCD.cpp Process.cpp APIService.cpp Monitor.cpp common.cpp
diff --git a/ndb/src/kernel/blocks/backup/restore/Makefile.am b/ndb/src/kernel/blocks/backup/restore/Makefile.am
index d2c8e5a5e4f..1cc17a99a34 100644
--- a/ndb/src/kernel/blocks/backup/restore/Makefile.am
+++ b/ndb/src/kernel/blocks/backup/restore/Makefile.am
@@ -1,5 +1,5 @@
-bin_PROGRAMS = restore
+ndbtools_PROGRAMS = restore
restore_SOURCES = main.cpp Restore.cpp
diff --git a/ndb/src/kernel/ndb-main/Makefile.am b/ndb/src/kernel/ndb-main/Makefile.am
index f6995ed49a0..731f79585ed 100644
--- a/ndb/src/kernel/ndb-main/Makefile.am
+++ b/ndb/src/kernel/ndb-main/Makefile.am
@@ -1,5 +1,5 @@
-bin_PROGRAMS = ndb
+ndbbin_PROGRAMS = ndb
ndb_SOURCES = Main.cpp SimBlockList.cpp
diff --git a/ndb/src/mgmapi/Makefile.am b/ndb/src/mgmapi/Makefile.am
index b223478ea56..758a874fca4 100644
--- a/ndb/src/mgmapi/Makefile.am
+++ b/ndb/src/mgmapi/Makefile.am
@@ -1,16 +1,16 @@
-noinst_LTLIBRARIES = libmgmapi.la libMGM_API.la
+ndblib_LTLIBRARIES = libmgmapi.la libMGM_API.la
libmgmapi_la_SOURCES_loc = mgmapi.cpp
libmgmapi_la_SOURCES = $(libmgmapi_la_SOURCES_loc)
libMGM_API_la_SOURCES = $(libmgmapi_la_SOURCES_loc)
+INCLUDES_LOC = -I$(top_srcdir)/ndb/include/mgmapi -I$(top_srcdir)/ndb/src/common/mgmcommon
+DEFS_LOC = -DNO_DEBUG_MESSAGES
+
include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_util.mk.am
-INCLUDES += -I$(top_srcdir)/ndb/include/mgmapi -I$(top_srcdir)/ndb/src/common/mgmcommon
-
-DEFS += -DNO_DEBUG_MESSAGES
libMGM_API_la_LIBADD = \
$(top_srcdir)/ndb/src/common/portlib/unix/libportlib.la \
diff --git a/ndb/src/mgmclient/Makefile.am b/ndb/src/mgmclient/Makefile.am
index c57e87d4d50..e01e4b4f371 100644
--- a/ndb/src/mgmclient/Makefile.am
+++ b/ndb/src/mgmclient/Makefile.am
@@ -1,5 +1,5 @@
-bin_PROGRAMS = mgmtclient
+ndbbin_PROGRAMS = mgmtclient
mgmtclient_SOURCES = \
main.cpp \
diff --git a/ndb/src/mgmsrv/Makefile.am b/ndb/src/mgmsrv/Makefile.am
index b598ad6f49c..272338d02ac 100644
--- a/ndb/src/mgmsrv/Makefile.am
+++ b/ndb/src/mgmsrv/Makefile.am
@@ -1,5 +1,5 @@
-bin_PROGRAMS = mgmtsrvr
+ndbbin_PROGRAMS = mgmtsrvr
mgmtsrvr_SOURCES = \
MgmtSrvr.cpp \
@@ -13,17 +13,15 @@ mgmtsrvr_SOURCES = \
MgmtSrvrConfig.cpp \
CommandInterpreter.cpp
-include $(top_srcdir)/ndb/config/common.mk.am
-include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
-INCLUDES += -I$(top_srcdir)/ndb/src/ndbapi -I$(top_srcdir)/ndb/include/mgmapi -I$(top_srcdir)/ndb/src/common/mgmcommon
+INCLUDES_LOC = -I$(top_srcdir)/ndb/src/ndbapi -I$(top_srcdir)/ndb/include/mgmapi -I$(top_srcdir)/ndb/src/common/mgmcommon
-LDADD += \
+LDADD_LOC = \
$(top_srcdir)/ndb/src/mgmapi/libmgmapi.la \
- $(top_srcdir)/ndb/src/ndbapi/libNDB_API.la \
- $(top_srcdir)/ndb/src/common/mgmcommon/libmgmsrvcommon.la \
- $(top_srcdir)/ndb/src/common/util/libgeneral.la \
$(top_srcdir)/ndb/src/common/editline/libeditline.a \
@TERMCAP_LIB@
+include $(top_srcdir)/ndb/config/common.mk.am
+include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
+
# Don't update the files from bitkeeper
%::SCCS/s.%
diff --git a/ndb/src/ndbapi/Makefile.am b/ndb/src/ndbapi/Makefile.am
index 3f585be74c6..1c474d26cb0 100644
--- a/ndb/src/ndbapi/Makefile.am
+++ b/ndb/src/ndbapi/Makefile.am
@@ -1,6 +1,6 @@
#SUBDIRS = signal-sender
-noinst_LTLIBRARIES = libndbapi.la libNDB_API.la
+ndblib_LTLIBRARIES = libndbapi.la libNDB_API.la
libndbapi_la_SOURCES_loc = \
TransporterFacade.cpp \
diff --git a/ndb/test/ndbapi/Makefile.am b/ndb/test/ndbapi/Makefile.am
index 92c4a4a20bd..f583823c87f 100644
--- a/ndb/test/ndbapi/Makefile.am
+++ b/ndb/test/ndbapi/Makefile.am
@@ -1,7 +1,7 @@
SUBDIRS = bank
-bin_PROGRAMS = \
+ndbtest_PROGRAMS = \
flexBench \
drop_all_tabs \
create_all_tabs \
diff --git a/ndb/test/ndbapi/bank/Makefile.am b/ndb/test/ndbapi/bank/Makefile.am
index 03f8f1d1c0b..40a23d1dbfc 100644
--- a/ndb/test/ndbapi/bank/Makefile.am
+++ b/ndb/test/ndbapi/bank/Makefile.am
@@ -1,5 +1,5 @@
-bin_PROGRAMS = testBank bankSumAccounts bankValidateAllGLs bankMakeGL bankTransactionMaker bankCreator bankTimer
+ndbtest_PROGRAMS = testBank bankSumAccounts bankValidateAllGLs bankMakeGL bankTransactionMaker bankCreator bankTimer
noinst_LIBRARIES = libbank.a
diff --git a/ndb/test/tools/Makefile.am b/ndb/test/tools/Makefile.am
index 715727f9262..8489bc85fe9 100644
--- a/ndb/test/tools/Makefile.am
+++ b/ndb/test/tools/Makefile.am
@@ -1,5 +1,5 @@
-bin_PROGRAMS = waiter hugoCalculator hugoLoad hugoFill hugoLockRecords hugoPkDelete hugoPkRead hugoPkReadRecord hugoPkUpdate hugoScanRead hugoScanUpdate restart verify_index copy_tab create_index ndb_cpcc
+ndbtest_PROGRAMS = hugoCalculator hugoLoad hugoFill hugoLockRecords hugoPkDelete hugoPkRead hugoPkReadRecord hugoPkUpdate hugoScanRead hugoScanUpdate restart verify_index copy_tab create_index ndb_cpcc
# transproxy
@@ -14,7 +14,6 @@ hugoPkUpdate_SOURCES = hugoPkUpdate.cpp
hugoScanRead_SOURCES = hugoScanRead.cpp
hugoScanUpdate_SOURCES = hugoScanUpdate.cpp
restart_SOURCES = restart.cpp
-waiter_SOURCES = waiter.cpp
# transproxy_SOURCES = transproxy.cpp
verify_index_SOURCES = verify_index.cpp
copy_tab_SOURCES = copy_tab.cpp
diff --git a/ndb/tools/Makefile.am b/ndb/tools/Makefile.am
index 46c732c597c..89937642f13 100644
--- a/ndb/tools/Makefile.am
+++ b/ndb/tools/Makefile.am
@@ -1,6 +1,7 @@
-bin_PROGRAMS = drop_tab delete_all desc drop_index list_tables select_all select_count
+ndbtools_PROGRAMS = ndb_waiter drop_tab delete_all desc drop_index list_tables select_all select_count
+ndb_waiter_SOURCES = waiter.cpp
delete_all_SOURCES = delete_all.cpp
desc_SOURCES = desc.cpp
drop_index_SOURCES = drop_index.cpp
diff --git a/ndb/test/tools/waiter.cpp b/ndb/tools/waiter.cpp
index d57daff3aea..d57daff3aea 100644
--- a/ndb/test/tools/waiter.cpp
+++ b/ndb/tools/waiter.cpp