From c0db0ce9aa64f82931c6287579cfc0f682dde02c Mon Sep 17 00:00:00 2001
From: "magnus@neptunus.(none)" <>
Date: Wed, 14 Apr 2004 11:55:14 +0200
Subject: [PATCH] Fix up of Makefiles for NDB Cluster

---
 ndb/examples/Makefile               |  1 +
 ndb/src/Makefile                    |  1 -
 ndb/test/ndbapi/Makefile            |  9 +---
 ndb/test/ndbapi/flexAsynch/Makefile | 36 ---------------
 ndb/test/ndbapi/flexBench/Makefile  | 36 ---------------
 ndb/test/ndbapi/flexTT/Makefile     | 36 ---------------
 ndb/test/odbc/Makefile              |  6 +--
 ndb/tools/Makefile                  |  2 +-
 ndb/tools/init_rm/init_rm.c         | 69 -----------------------------
 9 files changed, 7 insertions(+), 189 deletions(-)
 delete mode 100644 ndb/tools/init_rm/init_rm.c

diff --git a/ndb/examples/Makefile b/ndb/examples/Makefile
index e1fb71a181..0294632e23 100644
--- a/ndb/examples/Makefile
+++ b/ndb/examples/Makefile
@@ -20,6 +20,7 @@ clean:
 		$(MAKE) -C $$f $@;\
 	done
 
+clean_dep: clean
 cleanall: clean
 tidy: clean
 distclean: clean
diff --git a/ndb/src/Makefile b/ndb/src/Makefile
index c4a58871f3..4f71eb4605 100644
--- a/ndb/src/Makefile
+++ b/ndb/src/Makefile
@@ -5,7 +5,6 @@ DIRS := \
         common  \
         kernel  \
         ndbapi  \
-	env     \
 	mgmsrv  \
         mgmapi  \
 	rep \
diff --git a/ndb/test/ndbapi/Makefile b/ndb/test/ndbapi/Makefile
index 67dbc120e6..91f0c84c18 100644
--- a/ndb/test/ndbapi/Makefile
+++ b/ndb/test/ndbapi/Makefile
@@ -4,15 +4,13 @@ include .defs.mk
 ifeq ($(NDB_OS), OSE)
 DIRS = basic flexBench flexAsynch
 else
-DIRS = lmc-bench bank
+DIRS = lmc-bench bank ronja
 BIN_DIRS = 			\
 	flexAsynch      \
 	flexBench       \
 	flexHammer	\
 	flexScan        \
 	flexTT          \
-        nodeRecovery    \
-	restartgci  	\
 	create_tab	\
 	create_all_tabs \
 	drop_all_tabs	\
@@ -33,16 +31,13 @@ BIN_DIRS = 			\
 	testRestartGci	\
 	testDataBuffers \
 	testDict	\
-        initronja 	\
-	benchronja 	\
         acid 		\
 	interpreterInTup \
 	telco       \
-        indexTest       \
+	indexTest       \
 	test_event      \
         indexTest2      \
 	testGrep                
-#	tables 		\
 
 ifeq ($(NDB_OS), SOLARIS)
 ifeq ($(NDB_COMPILER), FORTE6)
diff --git a/ndb/test/ndbapi/flexAsynch/Makefile b/ndb/test/ndbapi/flexAsynch/Makefile
index b7de618a10..2c77c8e21d 100644
--- a/ndb/test/ndbapi/flexAsynch/Makefile
+++ b/ndb/test/ndbapi/flexAsynch/Makefile
@@ -9,39 +9,3 @@ SOURCES = flexAsynch.cpp
 
 include $(NDB_TOP)/Epilogue.mk
 
-# run automated tests
-test:
-	@echo "Results test-scripts flexScan." > report.txt
-	@echo "==============================" >> report.txt
-	@echo >> report.txt
-	@echo "User : \t\t\c" >> report.txt
-	@whoami >> report.txt
-	@echo "Date : \t\t\c" >> report.txt
-	@date >> report.txt
-	@echo >> report.txt
-	@echo "Host : \t\t\c" >> report.txt
-	@uname -n >> report.txt
-	@echo "\nStarting test 1."
-	@echo "\n==============================\n" >> report.txt
-	@test1.sh
-	@echo "\nStarting test 2."
-	@echo "\n==============================\n" >> report.txt
-	@test2.sh
-	@echo "\nStarting test 3."
-	@echo "\n==============================\n" >> report.txt
-	@test3.sh
-
-# run basic tests
-run_test :
-	flexBench
-	flexBench -t 32 -o 5000
-	flexBench -simple
-	flexBench -simple -t 32
-	flexBench -dirty
-	flexBench -dirty -t 32
-	flexBench -write 
-	flexBench -write -t 32
-	flexBench -dirty -write
-	flexBench -dirty -write -t 32
-	flexBench -c 16 -t 32 -o 5000
-	flexBench -t 16 -c 30 -o 10000
diff --git a/ndb/test/ndbapi/flexBench/Makefile b/ndb/test/ndbapi/flexBench/Makefile
index 78d4039258..bfff5cd161 100644
--- a/ndb/test/ndbapi/flexBench/Makefile
+++ b/ndb/test/ndbapi/flexBench/Makefile
@@ -9,39 +9,3 @@ SOURCES = flexBench.cpp
 
 include $(NDB_TOP)/Epilogue.mk
 
-# run automated tests
-test:
-	@echo "Results test-scripts flexScan." > report.txt
-	@echo "==============================" >> report.txt
-	@echo >> report.txt
-	@echo "User : \t\t\c" >> report.txt
-	@whoami >> report.txt
-	@echo "Date : \t\t\c" >> report.txt
-	@date >> report.txt
-	@echo >> report.txt
-	@echo "Host : \t\t\c" >> report.txt
-	@uname -n >> report.txt
-	@echo "\nStarting test 1."
-	@echo "\n==============================\n" >> report.txt
-	@test1.sh
-	@echo "\nStarting test 2."
-	@echo "\n==============================\n" >> report.txt
-	@test2.sh
-	@echo "\nStarting test 3."
-	@echo "\n==============================\n" >> report.txt
-	@test3.sh
-
-# run basic tests
-run_test :
-	flexBench
-	flexBench -t 32 -o 5000
-	flexBench -simple
-	flexBench -simple -t 32
-	flexBench -dirty
-	flexBench -dirty -t 32
-	flexBench -write 
-	flexBench -write -t 32
-	flexBench -dirty -write
-	flexBench -dirty -write -t 32
-	flexBench -c 16 -t 32 -o 5000
-	flexBench -t 16 -c 30 -o 10000
diff --git a/ndb/test/ndbapi/flexTT/Makefile b/ndb/test/ndbapi/flexTT/Makefile
index ba7493d633..a63bd803d9 100644
--- a/ndb/test/ndbapi/flexTT/Makefile
+++ b/ndb/test/ndbapi/flexTT/Makefile
@@ -9,39 +9,3 @@ SOURCES = flexTT.cpp
 
 include $(NDB_TOP)/Epilogue.mk
 
-# run automated tests
-test:
-	@echo "Results test-scripts flexScan." > report.txt
-	@echo "==============================" >> report.txt
-	@echo >> report.txt
-	@echo "User : \t\t\c" >> report.txt
-	@whoami >> report.txt
-	@echo "Date : \t\t\c" >> report.txt
-	@date >> report.txt
-	@echo >> report.txt
-	@echo "Host : \t\t\c" >> report.txt
-	@uname -n >> report.txt
-	@echo "\nStarting test 1."
-	@echo "\n==============================\n" >> report.txt
-	@test1.sh
-	@echo "\nStarting test 2."
-	@echo "\n==============================\n" >> report.txt
-	@test2.sh
-	@echo "\nStarting test 3."
-	@echo "\n==============================\n" >> report.txt
-	@test3.sh
-
-# run basic tests
-run_test :
-	flexBench
-	flexBench -t 32 -o 5000
-	flexBench -simple
-	flexBench -simple -t 32
-	flexBench -dirty
-	flexBench -dirty -t 32
-	flexBench -write 
-	flexBench -write -t 32
-	flexBench -dirty -write
-	flexBench -dirty -write -t 32
-	flexBench -c 16 -t 32 -o 5000
-	flexBench -t 16 -c 30 -o 10000
diff --git a/ndb/test/odbc/Makefile b/ndb/test/odbc/Makefile
index eab61ebd35..eb9f2dc9e3 100644
--- a/ndb/test/odbc/Makefile
+++ b/ndb/test/odbc/Makefile
@@ -2,9 +2,9 @@ include .defs.mk
 
 DIRS += driver
 
-ifneq ($(findstring odbc, $(wildcard /usr/lib/libodbc.so)),)
-DIRS +=		dm-unixodbc
-endif
+#ifneq ($(findstring odbc, $(wildcard /usr/lib/libodbc.so)),)
+#DIRS +=		dm-unixodbc
+#endif
 
 ifneq ($(findstring $(NDB_OS), SOLARIS),)
 DIRS +=		dm-iodbc
diff --git a/ndb/tools/Makefile b/ndb/tools/Makefile
index 40f440e2e7..b9dc6883e1 100644
--- a/ndb/tools/Makefile
+++ b/ndb/tools/Makefile
@@ -1,6 +1,6 @@
 include .defs.mk
 
-BIN_DIRS = init_rm select_all select_count desc list_tables \
+BIN_DIRS = select_all select_count desc list_tables \
 	drop_tab delete_all copy_tab \
 	create_index drop_index verify_index cpcc
 
diff --git a/ndb/tools/init_rm/init_rm.c b/ndb/tools/init_rm/init_rm.c
deleted file mode 100644
index 7a6265d9f7..0000000000
--- a/ndb/tools/init_rm/init_rm.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Copyright (C) 2003 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-#include <sys/types.h>
-#include <dirent.h>
-#include <string.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include <NdbMain.h>
-#include <NdbEnv.h>
-
-void rmdir_recurs(const char* path){
-  DIR* dirp;
-  struct dirent * dp;
-  char buf[255];
-
-  dirp = opendir(path);
-  while ((dp = readdir(dirp)) != NULL){
-    if ((strcmp(".", dp->d_name) != 0) && (strcmp("..", dp->d_name) != 0)) {
-      sprintf(buf, "%s/%s", path, dp->d_name);
-      //      printf(" %s\n", buf);
-      if (remove(buf) == 0){
-        printf("."); //printf("Removed: %s\n", buf); // The file was removed
-      } else { 
-        // The file was not removed, try to remove it as a directory
-        if(rmdir(buf) == 0){
-          ; //printf("Removed dir: %s\n", buf); // The dir was removed
-        } else {
-          // The directory was not removed, call this function again recursively
-          ; //printf("Call rm_dir: %s\n", buf);
-          rmdir_recurs(buf);
-          rmdir(buf);
-        }      
-      }
-    }
-  }
-  closedir(dirp);
-}
-
-NDB_COMMAND(init_rm, "init_rm", "init_rm [path to dir]", "Removes all files and dirs below [path to dir], default = /d/ndb/fs. WARNING can remove a lot of useful files!", 4096){
-
-  if(argc == 2){
-    printf("Removing all files and dirs in %s\n", argv[1]);
-    rmdir_recurs(argv[1]);
-  } else if(argc == 1){
-    printf("Removing all files and dirs in /d/ndb/fs\n");
-    rmdir_recurs("/d/ndb/fs");
-  }    
-  printf("\n");
-
-  return 0;
-
-
-}
-
-- 
2.30.9