You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 10:48:47 UTC

svn commit: r1132132 [1/11] - in /incubator/mesos/trunk: src/ src/common/ src/event_history/ third_party/sqlite-3.6.23.1/

Author: benh
Date: Sun Jun  5 08:48:46 2011
New Revision: 1132132

URL: http://svn.apache.org/viewvc?rev=1132132&view=rev
Log:
Factored event_writer, file_event_writer, and sqlite_event_writer out of
event_history into their own files for more modularity.

Added:
    incubator/mesos/trunk/src/event_history/event_writer.hpp
    incubator/mesos/trunk/src/event_history/file_event_writer.cpp
    incubator/mesos/trunk/src/event_history/file_event_writer.hpp
    incubator/mesos/trunk/src/event_history/sqlite_event_writer.cpp
    incubator/mesos/trunk/src/event_history/sqlite_event_writer.hpp
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/INSTALL
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/Makefile.am
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/Makefile.in
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/README
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/aclocal.m4
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/config.guess   (with props)
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/config.sub   (with props)
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/configure   (with props)
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/configure.ac
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/depcomp   (with props)
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/install-sh   (with props)
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/ltmain.sh   (with props)
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/missing   (with props)
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/shell.c
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/sqlite3   (with props)
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/sqlite3.1
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/sqlite3.c
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/sqlite3.h
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/sqlite3.pc
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/sqlite3.pc.in
    incubator/mesos/trunk/third_party/sqlite-3.6.23.1/sqlite3ext.h
Modified:
    incubator/mesos/trunk/src/Makefile.in
    incubator/mesos/trunk/src/common/date_utils.cpp
    incubator/mesos/trunk/src/common/date_utils.hpp
    incubator/mesos/trunk/src/event_history/event_history.cpp
    incubator/mesos/trunk/src/event_history/event_history.hpp

Modified: incubator/mesos/trunk/src/Makefile.in
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/Makefile.in?rev=1132132&r1=1132131&r2=1132132&view=diff
==============================================================================
--- incubator/mesos/trunk/src/Makefile.in (original)
+++ incubator/mesos/trunk/src/Makefile.in Sun Jun  5 08:48:46 2011
@@ -126,10 +126,14 @@ SLAVE_SWIG_WEBUI_OBJ = webui/slave/swig/
 WEBUI_OBJ = $(MASTER_WEBUI_OBJ) $(SLAVE_WEBUI_OBJ)
 SWIG_WEBUI_OBJ = $(MASTER_SWIG_WEBUI_OBJ) $(SLAVE_SWIG_WEBUI_OBJ)
 
+EVENT_HISTORY_OBJ = event_history/event_history.o \
+										event_history/file_event_writer.o \
+										event_history/sqlite_event_writer.o
+
 COMMON_OBJ = common/fatal.o messaging/messages.o common/lock.o		\
 	     detector/detector.o common/params.o			\
 	     detector/url_processor.o configurator/configurator.o	\
-	     common/string_utils.o common/logging.o event_history/event_history.o
+	     common/string_utils.o common/logging.o common/date_utils.o
 
 ifeq ($(WITH_ZOOKEEPER),1)
   COMMON_OBJ += detector/zookeeper.o
@@ -138,20 +142,21 @@ endif
 EXEC_LIB_OBJ = exec/exec.o
 SCHED_LIB_OBJ = sched/sched.o local/local.o
 
-BASIC_OBJ = $(MASTER_OBJ) $(SLAVE_OBJ) $(COMMON_OBJ)  \
+BASIC_OBJ = $(MASTER_OBJ) $(SLAVE_OBJ) $(EVENT_HISTORY_OBJ) $(COMMON_OBJ)  \
 	    $(SCHED_LIB_OBJ) $(EXEC_LIB_OBJ)
 
 ALL_OBJ = $(BASIC_OBJ) $(WEBUI_OBJ) $(SWIG_WEBUI_OBJ)
 
 MASTER_EXE_OBJ = $(MASTER_OBJ) $(MASTER_WEBUI_OBJ)	\
-                 $(MASTER_SWIG_WEBUI_OBJ) $(COMMON_OBJ)
+                 $(MASTER_SWIG_WEBUI_OBJ) $(EVENT_HISTORY_OBJ) $(COMMON_OBJ)
 
 SLAVE_EXE_OBJ = $(SLAVE_OBJ) $(SLAVE_WEBUI_OBJ)	\
                 $(SLAVE_SWIG_WEBUI_OBJ) $(COMMON_OBJ)
 
 LAUNCHER_EXE_OBJ = launcher/launcher.o $(COMMON_OBJ)
 
-LOCAL_EXE_OBJ = local/local.o $(MASTER_OBJ) $(SLAVE_OBJ) $(COMMON_OBJ)
+LOCAL_EXE_OBJ = local/local.o $(MASTER_OBJ) $(SLAVE_OBJ) $(EVENT_HISTORY_OBJ) \
+								$(COMMON_OBJ)
 
 MESOS_MASTER_EXE = $(BINDIR)/mesos-master
 MESOS_SLAVE_EXE = $(BINDIR)/mesos-slave
@@ -246,7 +251,7 @@ $(DIRECTORIES): %:
 $(BASIC_OBJ): %.o: @srcdir@/%.cpp | $(OBJ_DIRECTORIES)
 	$(CXX) -c $(CXXFLAGS) -o $@ $<
 
-$(MESOS_LIBS): $(COMMON_OBJ) | $(LIBDIR)
+$(MESOS_LIBS): $(EVENT_HISTORY_OBJ) $(COMMON_OBJ) | $(LIBDIR)
 
 $(MESOS_SCHED_LIB): $(SCHED_LIB_OBJ) $(MASTER_OBJ) $(SLAVE_OBJ)
 	$(AR) rcs $@ $^

Modified: incubator/mesos/trunk/src/common/date_utils.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/common/date_utils.cpp?rev=1132132&r1=1132131&r2=1132132&view=diff
==============================================================================
--- incubator/mesos/trunk/src/common/date_utils.cpp (original)
+++ incubator/mesos/trunk/src/common/date_utils.cpp Sun Jun  5 08:48:46 2011
@@ -1,3 +1,6 @@
+#include <ctime>
+#include <sys/types.h>
+#include <sys/time.h>
 #include <time.h>
 
 #include "date_utils.hpp"
@@ -29,6 +32,24 @@ string DateUtils::currentDate()
 }
 
 
+// Get the current time in microseconds.
+long DateUtils::currentDateTimeInMicro(){
+  struct timeval curr_time;
+  struct timezone tzp;
+  gettimeofday(&curr_time, &tzp);
+  return (long)(curr_time.tv_sec * 1000000 + curr_time.tv_usec);
+}
+
+
+// Get a human readable timestamp in microseconds.
+  string DateUtils::humanReadableDateTimeInMicro(){
+  time_t currTime;
+  currTime=time(NULL);
+  string timestamp = asctime(localtime(&currTime));
+  return timestamp.erase(24); /* chop off the newline */
+}
+
+
 // Unit test utility method that makes this class return a fixed string
 // as the date instead of looking up the current time.
 void DateUtils::setMockDate(string date)

Modified: incubator/mesos/trunk/src/common/date_utils.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/common/date_utils.hpp?rev=1132132&r1=1132131&r2=1132132&view=diff
==============================================================================
--- incubator/mesos/trunk/src/common/date_utils.hpp (original)
+++ incubator/mesos/trunk/src/common/date_utils.hpp Sun Jun  5 08:48:46 2011
@@ -18,6 +18,16 @@ public:
   static std::string currentDate();
 
   /**
+   * Get the current time in microseconds.
+   */
+  static long currentDateTimeInMicro();
+
+   /**
+    * Get a human readable timestamp in microseconds.
+    */
+  static std::string humanReadableDateTimeInMicro();
+
+  /**
    * Unit test utility method that makes this class return a fixed string
    * as the date instead of looking up the current time.
    */

Modified: incubator/mesos/trunk/src/event_history/event_history.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/event_history/event_history.cpp?rev=1132132&r1=1132131&r2=1132132&view=diff
==============================================================================
--- incubator/mesos/trunk/src/event_history/event_history.cpp (original)
+++ incubator/mesos/trunk/src/event_history/event_history.cpp Sun Jun  5 08:48:46 2011
@@ -1,206 +1,16 @@
-#include "event_history.hpp"
 #include <cstdlib>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/time.h>
 #include <stdarg.h>
+#include <sys/stat.h>
 
 #include <glog/logging.h>
 
-using namespace mesos::internal::eventhistory;
-
-//returns the current time in microseconds
-long getTimeStamp(){
-  struct timeval curr_time;
-  struct timezone tzp;
-  gettimeofday(&curr_time, &tzp);
-  return (long)(curr_time.tv_sec * 1000000 + curr_time.tv_usec);
-}
-
-
-//returns a human readable timestamp
-string getHumanReadableTimeStamp(){
-  time_t currTime; /* calendar time */
-  currTime=time(NULL); /* get current cal time */
-  string timestamp = asctime(localtime(&currTime));
-  return timestamp.erase(24); /* chop off the newline */
-}
-
-
-//////////FileEventWriter/////////
-
-/* Pre-condition: params["log_dir"] exists and is writable */
-FileEventWriter::FileEventWriter(const Params& params) {
-  string logDir = params.get("log_dir","");
-  CHECK_NE(logDir, "") << "FileEventWriter was created when no log_dir was set";
-  logfile.open ((logDir + "/event_history_log.txt").c_str(),ios::app|ios::out);
-}
-
-
-string FileEventWriter::getName() {
-  return "File Event Writer";
-}
-
-
-FileEventWriter::~FileEventWriter() {
-  logfile.close();
-  DLOG(INFO) << "closed event log file" << endl;
-}
-
-
-int FileEventWriter::logTaskCreated(TaskID tid, FrameworkID fwid, SlaveID sid,
-                                    string webuiUrl, Resources resVec)
-{
-  logfile << getHumanReadableTimeStamp() << ",CreateTask, "
-          << "taskid: " << tid << ", "
-          << "fwid: " << fwid << ", "
-          << "sid: " << sid << ","
-          << "cpus: " << resVec.cpus << ", mem: " << resVec.mem << endl;
-
-  return 0;
-}
-
-
-int FileEventWriter::logTaskStateUpdated(TaskID tid, FrameworkID fwid,
-                                         TaskState state)
-{
-  logfile << getHumanReadableTimeStamp() << ", TaskStateUpdate, "
-          << "taskid: " << tid << ", "
-          << "fwid: " << fwid << ", "
-          << "state: " << state << endl;
-
-  return 0;
-}
-
-
-int FileEventWriter::logFrameworkRegistered(FrameworkID fwid, string user) {
-  logfile << getHumanReadableTimeStamp() << ", CreateFramework, "
-          << "fwid: " << fwid << ", "
-          << "userid: " << user << endl;
-
-  return 0;
-}
-
-
-int FileEventWriter::logFrameworkUnregistered(FrameworkID fwid) {
-  LOG(FATAL) << "FileEventWriter::logFrameworkUnregistered not implemented yet";
-  return -1;
-}
-
-
-//////////SqlLiteEventWriter/////////
-static int callback(void *NotUsed, int argc, char **argv, char **azColName){
-  int i;
-  for(i=0; i<argc; i++){
-    printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");
-  }
-  printf("\n");
-  return 0;
-}
-
-
-string SqlLiteEventWriter::getName(){
-  return "Sqlite Event Writer";
-}
-
-
-/* Pre-condition: params["log_dir"] exists and is writable */
-SqlLiteEventWriter::SqlLiteEventWriter(const Params& params) {
-  zErrMsg = 0;
-  string logDir = params.get("log_dir","");
-  CHECK_NE(logDir, "") << "SqlLiteEventWriter constructor failed pre-condition."
-                       << " params[\"log_dir\" must be set.";
-
-  //set up log file in log dir
-  int rc = sqlite3_open((logDir + "/event_history_db.sqlite3").c_str(),&db);
-  if( rc ) {
-    LOG(ERROR) << "Can't open database: " << sqlite3_errmsg(db) << endl;
-    sqlite3_close(db);
-  } else {
-    DLOG(INFO) << "opened sql lite db" << endl;
-  }
-  //create task table in case it doesn't already exist,
-  //if it does this shouldn't destroy it
-  sqlite3_exec(db, "CREATE TABLE task (taskid Varchar(255), fwid Varchar(255), \
-                    sid Varchar(255), webuiUrl Varchar(255), \
-                    datetime_created integer, resource_list Varchar(255))",
-               ::callback, 0, &zErrMsg);
-
-  sqlite3_exec(db, "CREATE TABLE taskstate (taskid Varchar(255), \
-                    fwid Varchar(255), state Varchar(255), \
-                    datetime_updated integer)",
-               ::callback, 0, &zErrMsg);
-
-  sqlite3_exec(db, "CREATE TABLE framework (fwid Varchar(255), \
-                    user Varchar(255), datetime_registered integer)",
-               ::callback, 0, &zErrMsg);
-}
-
-
-SqlLiteEventWriter::~SqlLiteEventWriter() {
-  sqlite3_close(db);
-  DLOG(INFO) << "closed sqllite db" << endl;
-}
-
-
-int SqlLiteEventWriter::logTaskCreated(TaskID tid, FrameworkID fwid,
-                                       SlaveID sid, string webuiUrl, 
-                                       Resources resVec)
-{
-  stringstream ss;
-  ss << "INSERT INTO task VALUES ("
-     << "\"" << tid << "\"" << ","
-     << "\"" << fwid << "\"" << ","
-     << "\"" << sid << "\"" << ","
-     << "\"" << webuiUrl << "\"" << ","
-     << getTimeStamp() << ","
-     << "'{"
-       << "\"cpus\":\"" << resVec.cpus << "\","
-       << "\"mem\":\"" << resVec.mem << "\""
-     << "}'"
-     << ")" << endl;
-  DLOG(INFO) << "executing " << ss.str() << endl;
-  sqlite3_exec(db, ss.str().c_str(), callback, 0, &zErrMsg);
-
-  return 0;
-}
-
-
-int SqlLiteEventWriter::logTaskStateUpdated(TaskID tid, FrameworkID fwid,
-                                            TaskState state)
-{
-  stringstream ss;
-  ss << "INSERT INTO taskstate VALUES ("
-     << "\"" << tid << "\"" << ","
-     << "\"" << fwid << "\"" << ","
-     << "\"" << state << "\"" << ","
-     << getTimeStamp() << ")" << endl;
-  DLOG(INFO) << "executing " << ss.str() << endl;
-  sqlite3_exec(db, ss.str().c_str(), callback, 0, &zErrMsg);
-
-  return 0;
-}
-
-
-int SqlLiteEventWriter::logFrameworkRegistered(FrameworkID fwid, string user) {
-  stringstream ss;
-  ss << "INSERT INTO framework VALUES ("
-     << "\"" << fwid << "\"" << ","
-     << "\"" << user << "\"" << ","
-     << getTimeStamp() << ")" << endl;
-  DLOG(INFO) << "executing " << ss.str() << endl;
-  sqlite3_exec(db, ss.str().c_str(), callback, 0, &zErrMsg); 
-  return 0;
-}
-
+#include "event_history.hpp"
+#include "file_event_writer.hpp"
+#include "sqlite_event_writer.hpp"
 
-int SqlLiteEventWriter::logFrameworkUnregistered(FrameworkID fwid) {
-  LOG(FATAL) << "SqlLiteEvent::logFrameworkUnregistered not implemented yet";
-  return -1;
-}
+using namespace mesos::internal::eventhistory;
 
 
-/////////////EventLogger//////////
 void EventLogger::registerOptions(Configurator* conf) {
   //TODO(andyk): We don't set the default value here, since this would
   //             override the defaults set at the param.get() calls later.
@@ -208,16 +18,16 @@ void EventLogger::registerOptions(Config
   conf->addOption<bool>("event-history-file",
         "Enable file event history logging(default: true)");
   conf->addOption<bool>("event-history-sqlite",
-      "Enable SQLite event history logging (default: false)");
+        "Enable SQLite event history logging (default: false)");
 }
 
 
 EventLogger::EventLogger() { }
 
 
-EventLogger::EventLogger(const Params& params) {
+EventLogger::EventLogger(const Params& conf) {
   struct stat sb;
-  string logDir = params.get("log_dir", "");
+  string logDir = conf.get("log_dir", "");
   if (logDir != "") {
     LOG(INFO) << "creating EventLogger, using log_dir: " << logDir << endl;
     if (stat(logDir.c_str(), &sb) == -1) {
@@ -230,13 +40,13 @@ EventLogger::EventLogger(const Params& p
     }
     //Create and add file based writers (i.e. writers which depend on log_dir
     //being set) to writers list.
-    if (params.get<bool>("event-history-file", true)) {
+    if (conf.get<bool>("event-history-file", true)) {
       LOG(INFO) << "creating FileEventWriter" << endl;
-      writers.push_front(new FileEventWriter(params));
+      writers.push_front(new FileEventWriter(conf));
     }
-    if (params.get<bool>("event-history-sqlite", false)) {
+    if (conf.get<bool>("event-history-sqlite", false)) {
       LOG(INFO) << "creating SqliteEventWriter" << endl;
-      writers.push_front(new SqlLiteEventWriter(params));
+      writers.push_front(new SqlLiteEventWriter(conf));
     }
   } else {
     LOG(INFO) << "No log directory was specified, so not creating "

Modified: incubator/mesos/trunk/src/event_history/event_history.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/event_history/event_history.hpp?rev=1132132&r1=1132131&r2=1132132&view=diff
==============================================================================
--- incubator/mesos/trunk/src/event_history/event_history.hpp (original)
+++ incubator/mesos/trunk/src/event_history/event_history.hpp Sun Jun  5 08:48:46 2011
@@ -1,22 +1,25 @@
 #ifndef __EVENT_HISTORY_HPP__
 #define __EVENT_HISTORY_HPP__
 
-#include <ctime>
-#include <fstream>
-#include <iostream>
+//#include <fstream>
+//#include <iostream>
 #include <list>
-#include <map>
+//#include <map>
 #include <string>
 
-#include <sqlite3.h>
+#include <glog/logging.h>
 
-#include "configurator/configurator.hpp"
 #include "common/resources.hpp"
+
+#include "configurator/configurator.hpp"
+
 #include "mesos.hpp"
 
+#include "event_writer.hpp"
+
 namespace mesos { namespace internal { namespace eventhistory {
 
-using namespace std;
+using namespace std; //for list
 using mesos::FrameworkID;
 using mesos::TaskID;
 using mesos::SlaveID;
@@ -24,49 +27,6 @@ using mesos::FrameworkID;
 using mesos::TaskState;
 using mesos::internal::Resources;
 
-class EventWriter {
-public:
-  virtual ~EventWriter() {}
-  virtual string getName() = 0;
-  virtual int logTaskCreated(TaskID, FrameworkID, SlaveID, string sHostname, Resources) = 0;
-  virtual int logTaskStateUpdated(TaskID, FrameworkID, TaskState) = 0; 
-  virtual int logFrameworkRegistered(FrameworkID, string) = 0;
-  virtual int logFrameworkUnregistered(FrameworkID) = 0;
-};
-
-
-class FileEventWriter : public EventWriter {
-private:
-  ofstream logfile;
-  time_t currTime;
-public:
-  string getName();
-  FileEventWriter(); 
-  FileEventWriter(const Params&);
-  ~FileEventWriter();
-  int logTaskCreated(TaskID, FrameworkID, SlaveID, string sHostname, Resources);
-  int logTaskStateUpdated(TaskID, FrameworkID, TaskState); 
-  int logFrameworkRegistered(FrameworkID, string);
-  int logFrameworkUnregistered(FrameworkID);
-};
-
-
-class SqlLiteEventWriter : public EventWriter {
-private:
-  sqlite3 *db; 
-  char *zErrMsg;
-  time_t currTime;
-public:
-  string getName();
-  SqlLiteEventWriter(); 
-  SqlLiteEventWriter(const Params&);
-  ~SqlLiteEventWriter();
-  int logTaskCreated(TaskID, FrameworkID, SlaveID, string sHostname, Resources);
-  int logTaskStateUpdated(TaskID, FrameworkID, TaskState); 
-  int logFrameworkRegistered(FrameworkID, string);
-  int logFrameworkUnregistered(FrameworkID);
-};
-
 
 class EventLogger {
 private:

Added: incubator/mesos/trunk/src/event_history/event_writer.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/event_history/event_writer.hpp?rev=1132132&view=auto
==============================================================================
--- incubator/mesos/trunk/src/event_history/event_writer.hpp (added)
+++ incubator/mesos/trunk/src/event_history/event_writer.hpp Sun Jun  5 08:48:46 2011
@@ -0,0 +1,35 @@
+#ifndef __EVENT_WRITER_HPP__
+#define __EVENT_WRITER_HPP__
+
+#include <string>
+
+#include "configurator/configurator.hpp"
+#include "common/resources.hpp"
+
+#include "mesos.hpp"
+
+namespace mesos { namespace internal { namespace eventhistory {
+
+using namespace std;
+
+using mesos::FrameworkID;
+using mesos::TaskID;
+using mesos::SlaveID;
+using mesos::FrameworkID;
+using mesos::TaskState;
+using mesos::internal::Resources;
+
+class EventWriter {
+public:
+  virtual ~EventWriter() {}
+  virtual string getName() = 0;
+  virtual int logTaskCreated(TaskID, FrameworkID, SlaveID, 
+                             string sHostname, Resources) = 0;
+  virtual int logTaskStateUpdated(TaskID, FrameworkID, TaskState) = 0; 
+  virtual int logFrameworkRegistered(FrameworkID, string) = 0;
+  virtual int logFrameworkUnregistered(FrameworkID) = 0;
+};
+
+}}} /* namespace */
+
+#endif /* __EVENT_WRITER_HPP__ */

Added: incubator/mesos/trunk/src/event_history/file_event_writer.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/event_history/file_event_writer.cpp?rev=1132132&view=auto
==============================================================================
--- incubator/mesos/trunk/src/event_history/file_event_writer.cpp (added)
+++ incubator/mesos/trunk/src/event_history/file_event_writer.cpp Sun Jun  5 08:48:46 2011
@@ -0,0 +1,68 @@
+#include <fstream>
+#include <iostream>
+
+#include <glog/logging.h>
+
+#include "common/date_utils.hpp"
+
+#include "file_event_writer.hpp"
+
+using namespace mesos::internal::eventhistory;
+
+/* Pre-condition: params["log_dir"] exists and is writable */
+FileEventWriter::FileEventWriter(const Params& params) {
+  string logDir = params.get("log_dir","");
+  CHECK_NE(logDir, "") << "FileEventWriter was created when no log_dir was set";
+  logfile.open ((logDir + "/event_history_log.txt").c_str(),ios::app|ios::out);
+}
+
+
+string FileEventWriter::getName() {
+  return "File Event Writer";
+}
+
+
+FileEventWriter::~FileEventWriter() {
+  logfile.close();
+  DLOG(INFO) << "closed event log file" << endl;
+}
+
+
+int FileEventWriter::logTaskCreated(TaskID tid, FrameworkID fwid, SlaveID sid,
+                                    string webuiUrl, Resources resVec)
+{
+  logfile << DateUtils::humanReadableDateTimeInMicro() << ",CreateTask, "
+          << "taskid: " << tid << ", "
+          << "fwid: " << fwid << ", "
+          << "sid: " << sid << ","
+          << "cpus: " << resVec.cpus << ", mem: " << resVec.mem << endl;
+
+  return 0;
+}
+
+
+int FileEventWriter::logTaskStateUpdated(TaskID tid, FrameworkID fwid,
+                                         TaskState state)
+{
+  logfile << DateUtils::humanReadableDateTimeInMicro() << ", TaskStateUpdate, "
+          << "taskid: " << tid << ", "
+          << "fwid: " << fwid << ", "
+          << "state: " << state << endl;
+
+  return 0;
+}
+
+
+int FileEventWriter::logFrameworkRegistered(FrameworkID fwid, string user) {
+  logfile << DateUtils::humanReadableDateTimeInMicro() << ", CreateFramework, "
+          << "fwid: " << fwid << ", "
+          << "userid: " << user << endl;
+
+  return 0;
+}
+
+
+int FileEventWriter::logFrameworkUnregistered(FrameworkID fwid) {
+  LOG(FATAL) << "FileEventWriter::logFrameworkUnregistered not implemented yet";
+  return -1;
+}

Added: incubator/mesos/trunk/src/event_history/file_event_writer.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/event_history/file_event_writer.hpp?rev=1132132&view=auto
==============================================================================
--- incubator/mesos/trunk/src/event_history/file_event_writer.hpp (added)
+++ incubator/mesos/trunk/src/event_history/file_event_writer.hpp Sun Jun  5 08:48:46 2011
@@ -0,0 +1,27 @@
+#ifndef __FILE_EVENT_WRITER_HPP__
+#define __FILE_EVENT_WRITER_HPP__
+
+#include "configurator/configurator.hpp"
+
+#include "event_writer.hpp"
+
+namespace mesos { namespace internal { namespace eventhistory {
+
+class FileEventWriter : public EventWriter {
+private:
+  ofstream logfile;
+  time_t currTime;
+public:
+  string getName();
+  FileEventWriter(); 
+  FileEventWriter(const Params&);
+  ~FileEventWriter();
+  int logTaskCreated(TaskID, FrameworkID, SlaveID, string sHostname, Resources);
+  int logTaskStateUpdated(TaskID, FrameworkID, TaskState); 
+  int logFrameworkRegistered(FrameworkID, string);
+  int logFrameworkUnregistered(FrameworkID);
+};
+
+}}} /* namespace */
+
+#endif /* __FILE_EVENT_WRITER_HPP__ */

Added: incubator/mesos/trunk/src/event_history/sqlite_event_writer.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/event_history/sqlite_event_writer.cpp?rev=1132132&view=auto
==============================================================================
--- incubator/mesos/trunk/src/event_history/sqlite_event_writer.cpp (added)
+++ incubator/mesos/trunk/src/event_history/sqlite_event_writer.cpp Sun Jun  5 08:48:46 2011
@@ -0,0 +1,113 @@
+#include "sqlite_event_writer.hpp"
+
+using namespace mesos::internal::eventhistory;
+
+static int callback(void *NotUsed, int argc, char **argv, char **azColName){
+  int i;
+  for(i=0; i<argc; i++){
+    printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");
+  }
+  printf("\n");
+  return 0;
+}
+
+
+string SqlLiteEventWriter::getName(){
+  return "Sqlite Event Writer";
+}
+
+
+/* Pre-condition: params["log_dir"] exists and is writable */
+SqlLiteEventWriter::SqlLiteEventWriter(const Params& params) {
+  zErrMsg = 0;
+  string logDir = params.get("log_dir","");
+  CHECK_NE(logDir, "") << "SqlLiteEventWriter constructor failed pre-condition."
+                       << " params[\"log_dir\" must be set.";
+
+  //set up log file in log dir
+  int rc = sqlite3_open((logDir + "/event_history_db.sqlite3").c_str(),&db);
+  if( rc ) {
+    LOG(ERROR) << "Can't open database: " << sqlite3_errmsg(db) << endl;
+    sqlite3_close(db);
+  } else {
+    DLOG(INFO) << "opened sql lite db" << endl;
+  }
+  //create task table in case it doesn't already exist,
+  //if it does this shouldn't destroy it
+  sqlite3_exec(db, "CREATE TABLE task (taskid Varchar(255), fwid Varchar(255), \
+                    sid Varchar(255), webuiUrl Varchar(255), \
+                    datetime_created integer, resource_list Varchar(255))",
+               ::callback, 0, &zErrMsg);
+
+  sqlite3_exec(db, "CREATE TABLE taskstate (taskid Varchar(255), \
+                    fwid Varchar(255), state Varchar(255), \
+                    datetime_updated integer)",
+               ::callback, 0, &zErrMsg);
+
+  sqlite3_exec(db, "CREATE TABLE framework (fwid Varchar(255), \
+                    user Varchar(255), datetime_registered integer)",
+               ::callback, 0, &zErrMsg);
+}
+
+
+SqlLiteEventWriter::~SqlLiteEventWriter() {
+  sqlite3_close(db);
+  DLOG(INFO) << "closed sqllite db" << endl;
+}
+
+
+int SqlLiteEventWriter::logTaskCreated(TaskID tid, FrameworkID fwid,
+                                       SlaveID sid, string webuiUrl, 
+                                       Resources resVec)
+{
+  stringstream ss;
+  ss << "INSERT INTO task VALUES ("
+     << "\"" << tid << "\"" << ","
+     << "\"" << fwid << "\"" << ","
+     << "\"" << sid << "\"" << ","
+     << "\"" << webuiUrl << "\"" << ","
+     << DateUtils::currentDateTimeInMicro() << ","
+     << "'{"
+       << "\"cpus\":\"" << resVec.cpus << "\","
+       << "\"mem\":\"" << resVec.mem << "\""
+     << "}'"
+     << ")" << endl;
+  DLOG(INFO) << "executing " << ss.str() << endl;
+  sqlite3_exec(db, ss.str().c_str(), callback, 0, &zErrMsg);
+
+  return 0;
+}
+
+
+int SqlLiteEventWriter::logTaskStateUpdated(TaskID tid, FrameworkID fwid,
+                                            TaskState state)
+{
+  stringstream ss;
+  ss << "INSERT INTO taskstate VALUES ("
+     << "\"" << tid << "\"" << ","
+     << "\"" << fwid << "\"" << ","
+     << "\"" << state << "\"" << ","
+     << DateUtils::currentDateTimeInMicro() << ")" << endl;
+  DLOG(INFO) << "executing " << ss.str() << endl;
+  sqlite3_exec(db, ss.str().c_str(), callback, 0, &zErrMsg);
+
+  return 0;
+}
+
+
+int SqlLiteEventWriter::logFrameworkRegistered(FrameworkID fwid, string user) {
+  stringstream ss;
+  ss << "INSERT INTO framework VALUES ("
+     << "\"" << fwid << "\"" << ","
+     << "\"" << user << "\"" << ","
+     << DateUtils::currentDateTimeInMicro() << ")" << endl;
+  DLOG(INFO) << "executing " << ss.str() << endl;
+  sqlite3_exec(db, ss.str().c_str(), callback, 0, &zErrMsg); 
+  return 0;
+}
+
+
+int SqlLiteEventWriter::logFrameworkUnregistered(FrameworkID fwid) {
+  LOG(FATAL) << "SqlLiteEvent::logFrameworkUnregistered not implemented yet";
+  return -1;
+}

Added: incubator/mesos/trunk/src/event_history/sqlite_event_writer.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/event_history/sqlite_event_writer.hpp?rev=1132132&view=auto
==============================================================================
--- incubator/mesos/trunk/src/event_history/sqlite_event_writer.hpp (added)
+++ incubator/mesos/trunk/src/event_history/sqlite_event_writer.hpp Sun Jun  5 08:48:46 2011
@@ -0,0 +1,30 @@
+#ifndef __SQL_EVENT_WRITER_HPP__
+#define __SQL_EVENT_WRITER_HPP__
+
+#include <sqlite3.h>
+
+#include "common/date_utils.hpp"
+
+#include "event_writer.hpp"
+
+namespace mesos { namespace internal { namespace eventhistory {
+
+class SqlLiteEventWriter : public EventWriter {
+private:
+  sqlite3 *db; 
+  char *zErrMsg;
+  time_t currTime;
+public:
+  string getName();
+  SqlLiteEventWriter(); 
+  SqlLiteEventWriter(const Params&);
+  ~SqlLiteEventWriter();
+  int logTaskCreated(TaskID, FrameworkID, SlaveID, string sHostname, Resources);
+  int logTaskStateUpdated(TaskID, FrameworkID, TaskState); 
+  int logFrameworkRegistered(FrameworkID, string);
+  int logFrameworkUnregistered(FrameworkID);
+};
+
+}}} /* namespace */
+
+#endif /* __SQL_EVENT_WRITER_HPP__ */

Added: incubator/mesos/trunk/third_party/sqlite-3.6.23.1/INSTALL
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/sqlite-3.6.23.1/INSTALL?rev=1132132&view=auto
==============================================================================
--- incubator/mesos/trunk/third_party/sqlite-3.6.23.1/INSTALL (added)
+++ incubator/mesos/trunk/third_party/sqlite-3.6.23.1/INSTALL Sun Jun  5 08:48:46 2011
@@ -0,0 +1,236 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).  Here is a another example:
+
+     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+

Added: incubator/mesos/trunk/third_party/sqlite-3.6.23.1/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/sqlite-3.6.23.1/Makefile.am?rev=1132132&view=auto
==============================================================================
--- incubator/mesos/trunk/third_party/sqlite-3.6.23.1/Makefile.am (added)
+++ incubator/mesos/trunk/third_party/sqlite-3.6.23.1/Makefile.am Sun Jun  5 08:48:46 2011
@@ -0,0 +1,19 @@
+
+AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
+
+lib_LTLIBRARIES = libsqlite3.la
+libsqlite3_la_SOURCES = sqlite3.c
+libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
+
+bin_PROGRAMS = sqlite3
+sqlite3_SOURCES = shell.c sqlite3.h
+sqlite3_LDADD = $(top_builddir)/libsqlite3.la @READLINE_LIBS@
+sqlite3_DEPENDENCIES = $(top_builddir)/libsqlite3.la
+
+include_HEADERS = sqlite3.h sqlite3ext.h
+
+EXTRA_DIST = sqlite3.pc sqlite3.1
+pkgconfigdir = ${libdir}/pkgconfig
+pkgconfig_DATA = sqlite3.pc
+
+man_MANS = sqlite3.1

Added: incubator/mesos/trunk/third_party/sqlite-3.6.23.1/Makefile.in
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/sqlite-3.6.23.1/Makefile.in?rev=1132132&view=auto
==============================================================================
--- incubator/mesos/trunk/third_party/sqlite-3.6.23.1/Makefile.in (added)
+++ incubator/mesos/trunk/third_party/sqlite-3.6.23.1/Makefile.in Sun Jun  5 08:48:46 2011
@@ -0,0 +1,731 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = sqlite3$(EXEEXT)
+DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/sqlite3.pc.in $(top_srcdir)/configure INSTALL \
+	config.guess config.sub depcomp install-sh ltmain.sh missing
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = sqlite3.pc
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
+	"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" \
+	"$(DESTDIR)$(includedir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libsqlite3_la_LIBADD =
+am_libsqlite3_la_OBJECTS = sqlite3.lo
+libsqlite3_la_OBJECTS = $(am_libsqlite3_la_OBJECTS)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_sqlite3_OBJECTS = shell.$(OBJEXT)
+sqlite3_OBJECTS = $(am_sqlite3_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libsqlite3_la_SOURCES) $(sqlite3_SOURCES)
+DIST_SOURCES = $(libsqlite3_la_SOURCES) $(sqlite3_SOURCES)
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgconfig_DATA)
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_CFLAGS = @BUILD_CFLAGS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DYNAMIC_EXTENSION_FLAGS = @DYNAMIC_EXTENSION_FLAGS@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADSAFE_FLAGS = @THREADSAFE_FLAGS@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
+lib_LTLIBRARIES = libsqlite3.la
+libsqlite3_la_SOURCES = sqlite3.c
+libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
+sqlite3_SOURCES = shell.c sqlite3.h
+sqlite3_LDADD = $(top_builddir)/libsqlite3.la @READLINE_LIBS@
+sqlite3_DEPENDENCIES = $(top_builddir)/libsqlite3.la
+include_HEADERS = sqlite3.h sqlite3ext.h
+EXTRA_DIST = sqlite3.pc sqlite3.1
+pkgconfigdir = ${libdir}/pkgconfig
+pkgconfig_DATA = sqlite3.pc
+man_MANS = sqlite3.1
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+am--refresh:
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+	      cd $(srcdir) && $(AUTOMAKE) --foreign  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+sqlite3.pc: $(top_builddir)/config.status $(srcdir)/sqlite3.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsqlite3.la: $(libsqlite3_la_OBJECTS) $(libsqlite3_la_DEPENDENCIES) 
+	$(LINK) -rpath $(libdir) $(libsqlite3_la_LDFLAGS) $(libsqlite3_la_OBJECTS) $(libsqlite3_la_LIBADD) $(LIBS)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+sqlite3$(EXEEXT): $(sqlite3_OBJECTS) $(sqlite3_DEPENDENCIES) 
+	@rm -f sqlite3$(EXEEXT)
+	$(LINK) $(sqlite3_LDFLAGS) $(sqlite3_OBJECTS) $(sqlite3_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shell.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqlite3.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-man1: $(man1_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
+	test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+	  else file=$$i; fi; \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	  $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
+	done
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
+	  rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
+	done
+install-pkgconfigDATA: $(pkgconfig_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
+	@list='$(pkgconfig_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+	  $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+	done
+
+uninstall-pkgconfigDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkgconfig_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+	done
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
+	  $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	mkdir $(distdir)
+	$(mkdir_p) $(distdir)/.
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && cd $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+	@cd $(distuninstallcheck_dir) \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS)
+install-binPROGRAMS: install-libLTLIBRARIES
+
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
+	clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includeHEADERS install-man \
+	install-pkgconfigDATA
+
+install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man: install-man1
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
+	uninstall-info-am uninstall-libLTLIBRARIES uninstall-man \
+	uninstall-pkgconfigDATA
+
+uninstall-man: uninstall-man1
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+	clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
+	clean-libtool ctags dist dist-all dist-bzip2 dist-gzip \
+	dist-shar dist-tarZ dist-zip distcheck distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-exec \
+	install-exec-am install-includeHEADERS install-info \
+	install-info-am install-libLTLIBRARIES install-man \
+	install-man1 install-pkgconfigDATA install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-binPROGRAMS \
+	uninstall-includeHEADERS uninstall-info-am \
+	uninstall-libLTLIBRARIES uninstall-man uninstall-man1 \
+	uninstall-pkgconfigDATA
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: incubator/mesos/trunk/third_party/sqlite-3.6.23.1/README
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/sqlite-3.6.23.1/README?rev=1132132&view=auto
==============================================================================
--- incubator/mesos/trunk/third_party/sqlite-3.6.23.1/README (added)
+++ incubator/mesos/trunk/third_party/sqlite-3.6.23.1/README Sun Jun  5 08:48:46 2011
@@ -0,0 +1,32 @@
+
+This package contains:
+
+ * the SQLite library amalgamation (single file) source code distribution,
+ * the shell.c file used to build the sqlite3 shell too, and
+ * the sqlite3.h and sqlite3ext.h header files required to link programs
+   and sqlite extensions against the installed libary.
+ * autoconf/automake installation infrastucture.
+
+The generic installation instructions for autoconf/automake are found
+in the INSTALL file.
+
+The following SQLite specific boolean options are supported:
+
+  --enable-readline           use readline in shell tool   [default=yes]
+  --enable-threadsafe         build a thread-safe library  [default=yes]
+  --enable-dynamic-extensions support loadable extensions  [default=yes]
+
+The default value for the CFLAGS variable (options passed to the C 
+compiler) includes debugging symbols in the build, resulting in larger
+binaries than are necessary. Override it on the configure command
+line like this:
+
+  $ CFLAGS="-Os" ./configure
+
+to produce a smaller installation footprint.
+
+Other SQLite compilation parameters can also be set using CFLAGS. For
+example:
+
+  $ CFLAGS="-Os -DSQLITE_OMIT_TRIGGERS" ./configure
+