From 09940e5b0e6bed626c648acea350fc8fd88405b4 Mon Sep 17 00:00:00 2001
From: Russell Sears <sears@yahoo-inc.com>
Date: Fri, 18 Nov 2011 16:18:55 -0800
Subject: [PATCH] get rid of broken dbcompile-all ant target, replace it with
 hacky make target, and rename makefile.

---
 Makefile.download-db-libs => Makefile | 6 +++++-
 build.xml                             | 8 +++-----
 2 files changed, 8 insertions(+), 6 deletions(-)
 rename Makefile.download-db-libs => Makefile (92%)

diff --git a/Makefile.download-db-libs b/Makefile
similarity index 92%
rename from Makefile.download-db-libs
rename to Makefile
index 34f04a0f..fa3de0bb 100644
--- a/Makefile.download-db-libs
+++ b/Makefile
@@ -21,6 +21,10 @@ REDIS_FILE=jedis-2.0.0.jar
 VOLDEMORT_DIR=db/voldemort/lib
 VOLDEMORT_FILE=voldemort-0.90.1.tar.gz
 
+.PHONY: build
+build: download-database-deps
+	ant -q -e compile
+	grep name=\"dbcompile build.xml | perl -ne '$$_=~/name=\"(.+)\"\s+depends/; print "$$1\n"; system "ant -q -e $$1"'
 
 download-database-deps:  $(CASSANDRA_5_DIR)/$(CASSANDRA_5_FILE) \
 			 $(CASSANDRA_6_DIR)/$(CASSANDRA_6_FILE) \
@@ -35,7 +39,7 @@ download-database-deps:  $(CASSANDRA_5_DIR)/$(CASSANDRA_5_FILE) \
 $(CASSANDRA_5_DIR)/$(CASSANDRA_5_FILE) :
 	wget http://archive.apache.org/dist/cassandra/0.5.1/$(CASSANDRA_5_FILE)\
 		 -O $(CASSANDRA_5_DIR)/$(CASSANDRA_5_FILE)
-	tar -C $(CASSANDRA_5_DIR) -zxf $(CASSANDRA_6_DIR)/$(CASSANDRA_5_FILE)
+	tar -C $(CASSANDRA_5_DIR) -zxf $(CASSANDRA_5_DIR)/$(CASSANDRA_5_FILE)
 
 $(CASSANDRA_6_DIR)/$(CASSANDRA_6_FILE) :
 	wget http://archive.apache.org/dist/cassandra/0.6.13/$(CASSANDRA_6_FILE)\
diff --git a/build.xml b/build.xml
index 307771e8..03894b08 100644
--- a/build.xml
+++ b/build.xml
@@ -15,8 +15,6 @@
         </fileset>
     </path>
 
-    <target name="dbcompile-all" depends="dbcompile-infinispan-5.0,dbcompile-cassandra-0.5,dbcompile-cassandra-0.6,dbcompile-cassandra-0.7,dbcompile-cassandra-0.8,dbcompile-hbase,dbcompile-mongodb,dbcompile-voldemort,dbcompile-jdbc,dbcompile-redis"/>
-
     <target name="dbcompile-infinispan-5.0" depends="compile">
         <property name="db.dir" value="db/infinispan-5.0" />
         <antcall target="dbcompile" />
@@ -69,20 +67,20 @@
 	
  	<target name="compile">
         <mkdir dir="${classes.dir}"/>
-        <javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="build.classpath" deprecation="on">
+        <javac includeantruntime="false" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="build.classpath" deprecation="on">
           <compilerarg value="-Xlint:unchecked"/>
         </javac>
         <antcall target="makejar"/>
     </target>
 
-	<target name="dbcompile">
+    <target name="dbcompile">
 	    <path id="dbclasspath">
 	        <fileset dir="${db.dir}/lib" includes="**/*.jar"/>
 	        <fileset file="build/ycsb.jar"/>
 	    </path>
 		
     	<mkdir dir="${classes.dir}"/>
-        <javac srcdir="${db.dir}/src" destdir="${classes.dir}" classpathref="dbclasspath" deprecation="on">
+        <javac includeantruntime="false" srcdir="${db.dir}/src" destdir="${classes.dir}" classpathref="dbclasspath" deprecation="on">
           <compilerarg value="-Xlint:unchecked"/>
         </javac>
         <antcall target="makejar"/>
-- 
GitLab