incubator-mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r1131538 - in /incubator/mesos/trunk: configure configure.ac src/Makefile.in
Date Sun, 05 Jun 2011 03:19:47 GMT
Author: benh
Date: Sun Jun  5 03:19:47 2011
New Revision: 1131538

URL: http://svn.apache.org/viewvc?rev=1131538&view=rev
Log:
Fixed build issue for Mac OS X so that we can actually run Java.

Modified:
    incubator/mesos/trunk/configure
    incubator/mesos/trunk/configure.ac
    incubator/mesos/trunk/src/Makefile.in

Modified: incubator/mesos/trunk/configure
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/configure?rev=1131538&r1=1131537&r2=1131538&view=diff
==============================================================================
--- incubator/mesos/trunk/configure (original)
+++ incubator/mesos/trunk/configure Sun Jun  5 03:19:47 2011
@@ -1851,6 +1851,21 @@ test -n "$target_alias" &&
 UNSUPPORTED_OS="Nexus is currently unsupported on your platform."
 
 case "${target_os}" in
+  linux*)
+    echo ===========================================================
+    echo Setting up build environment for ${target_cpu} ${target_os}
+    echo ===========================================================
+    OS_NAME=linux
+    ;;
+  darwin*)
+    echo ===========================================================
+    echo Setting up build environment for ${target_cpu} ${target_os}
+    echo ===========================================================
+    OS_NAME=darwin
+    CFLAGS="${CFLAGS} -D_XOPEN_SOURCE"
+    CXXFLAGS="${CXXFLAGS} -D_XOPEN_SOURCE"
+    LDFLAGS="${LDFLAGS} `$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var("LINKFORSHARED")
+ " -lpython" + sysconfig.get_config_var("VERSION")'`"
+    ;;
   solaris*)
     echo ===========================================================
     echo Setting up build environment for ${target_cpu} ${target_os}
@@ -1865,21 +1880,6 @@ case "${target_os}" in
     PYTHON="python2.6"
     OS_NAME=solaris
     ;;
-  linux*)
-    echo ===========================================================
-    echo Setting up build environment for ${target_cpu} ${target_os}
-    echo ===========================================================
-    OS_NAME=linux
-    ;;
-  darwin*)
-    echo ===========================================================
-    echo Setting up build environment for ${target_cpu} ${target_os}
-    echo ===========================================================
-    OS_NAME=macosx
-    CFLAGS="${CFLAGS} -D_XOPEN_SOURCE"
-    CXXFLAGS="${CXXFLAGS} -D_XOPEN_SOURCE"
-    LDFLAGS="${LDFLAGS} `$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var("LINKFORSHARED")
+ " -lpython" + sysconfig.get_config_var("VERSION")'`"
-   ;;
   *)
     { { echo "$as_me:$LINENO: error: $UNSUPPORTED_OS" >&5
 echo "$as_me: error: $UNSUPPORTED_OS" >&2;}

Modified: incubator/mesos/trunk/configure.ac
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/configure.ac?rev=1131538&r1=1131537&r2=1131538&view=diff
==============================================================================
--- incubator/mesos/trunk/configure.ac (original)
+++ incubator/mesos/trunk/configure.ac Sun Jun  5 03:19:47 2011
@@ -22,6 +22,21 @@ AC_CANONICAL_SYSTEM
 UNSUPPORTED_OS="Nexus is currently unsupported on your platform."
 
 case "${target_os}" in
+  linux*)
+    echo ===========================================================
+    echo Setting up build environment for ${target_cpu} ${target_os}
+    echo ===========================================================
+    OS_NAME=linux
+    ;;
+  darwin*)
+    echo ===========================================================
+    echo Setting up build environment for ${target_cpu} ${target_os}
+    echo ===========================================================
+    OS_NAME=darwin
+    CFLAGS="${CFLAGS} -D_XOPEN_SOURCE"
+    CXXFLAGS="${CXXFLAGS} -D_XOPEN_SOURCE"
+    LDFLAGS="${LDFLAGS} `$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var("LINKFORSHARED")
+ " -lpython" + sysconfig.get_config_var("VERSION")'`"
+    ;;
   solaris*)
     echo ===========================================================
     echo Setting up build environment for ${target_cpu} ${target_os}
@@ -36,21 +51,6 @@ case "${target_os}" in
     PYTHON="python2.6"
     OS_NAME=solaris
     ;;
-  linux*)
-    echo ===========================================================
-    echo Setting up build environment for ${target_cpu} ${target_os}
-    echo ===========================================================
-    OS_NAME=linux
-    ;;
-  darwin*)
-    echo ===========================================================
-    echo Setting up build environment for ${target_cpu} ${target_os}
-    echo ===========================================================
-    OS_NAME=macosx
-    CFLAGS="${CFLAGS} -D_XOPEN_SOURCE"
-    CXXFLAGS="${CXXFLAGS} -D_XOPEN_SOURCE"
-    LDFLAGS="${LDFLAGS} `$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var("LINKFORSHARED")
+ " -lpython" + sysconfig.get_config_var("VERSION")'`"
-   ;;
   *)
     AC_MSG_ERROR($UNSUPPORTED_OS)
   esac

Modified: incubator/mesos/trunk/src/Makefile.in
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/Makefile.in?rev=1131538&r1=1131537&r2=1131538&view=diff
==============================================================================
--- incubator/mesos/trunk/src/Makefile.in (original)
+++ incubator/mesos/trunk/src/Makefile.in Sun Jun  5 03:19:47 2011
@@ -62,9 +62,13 @@ LDFLAGS += -L$(ZOOKEEPER)/.libs
 CFLAGS += -MMD -MP
 CXXFLAGS += -MMD -MP
 
-# Add build date and user to CFLAGS, CXXFLAGS
-CFLAGS += -DBUILD_DATE="\"$$(date '+%Y-%m-%d %H:%M:%S')\"" -DBUILD_USER="\"$$USER\""
-CXXFLAGS += -DBUILD_DATE="\"$$(date '+%Y-%m-%d %H:%M:%S')\"" -DBUILD_USER="\"$$USER\""
+# Add build date to CFLAGS, CXXFLAGS
+CFLAGS += -DBUILD_DATE="\"$$(date '+%Y-%m-%d %H:%M:%S')\""
+CXXFLAGS += -DBUILD_DATE="\"$$(date '+%Y-%m-%d %H:%M:%S')\""
+
+# Add build user to CFLAGS, CXXFLAGS
+CFLAGS += -DBUILD_USER="\"$$USER\""
+CXXFLAGS += -DBUILD_USER="\"$$USER\""
 
 # Add libev, libprocess, pthread, and dl to LIBS.
 LIBS += -lglog -lgtest -lprocess -lev -lpthread -ldl -lzookeeper_mt
@@ -80,10 +84,10 @@ endif
 SCHED_LIB = libnexus_sched.a
 EXEC_LIB = libnexus_exec.a
 
-# For now the C++ library has both the scheduler and executor binaries.
-CPP_LIB = libnexus++.a
+# C/C++ library has both the scheduler and executor libraries.
+NEXUS_LIB = libnexus++.a
 
-NEXUS_LIBS = $(SCHED_LIB) $(EXEC_LIB) $(CPP_LIB)
+NEXUS_LIBS = $(SCHED_LIB) $(EXEC_LIB) $(NEXUS_LIB)
 
 MASTER_OBJ = master.o allocator_factory.o simple_allocator.o
 SLAVE_OBJ = slave.o launcher.o isolation_module_factory.o \
@@ -104,6 +108,18 @@ endif
 ALL_OBJ = $(MASTER_OBJ) $(SLAVE_OBJ) $(COMMON_OBJ) \
 	  $(SCHED_LIB_OBJ) $(EXEC_LIB_OBJ) $(TEST_OBJ)
 
+# Setup libraries from the SWIG world.
+ifeq ($(OS_NAME),darwin)
+  JAVA_LIB = swig/java/libnexus.dylib
+else
+  JAVA_LIB = swig/java/libnexus.so
+endif
+
+PYTHON_LIB = swig/python/_nexus.so
+
+RUBY_LIB = swig/ruby/nexus.so
+
+
 default: all
 
 -include $(patsubst %.o, %.d, $(ALL_OBJ))
@@ -122,7 +138,7 @@ $(SCHED_LIB): $(SCHED_LIB_OBJ) $(MASTER_
 $(EXEC_LIB): $(EXEC_LIB_OBJ) $(COMMON_OBJ)
 	$(AR) rcs $@ $^
 
-$(CPP_LIB): $(SCHED_LIB_OBJ) $(EXEC_LIB_OBJ) $(MASTER_OBJ) $(SLAVE_OBJ) $(COMMON_OBJ)
+$(NEXUS_LIB): $(SCHED_LIB_OBJ) $(EXEC_LIB_OBJ) $(MASTER_OBJ) $(SLAVE_OBJ) $(COMMON_OBJ)
 	$(AR) rcs $@ $^
 
 webui/master/swig/master_wrap.cpp: webui/master/swig/master.i master_state.hpp master_webui.hpp
master.hpp config.hpp
@@ -175,31 +191,31 @@ test-framework: test_framework.cpp $(SCH
 test-executor: test_exec.cpp $(EXEC_LIB) third_party/libprocess/libprocess.a
 	g++ $(CXXFLAGS) -o $@ $< $(LDFLAGS) -L. -lnexus_exec $(LIBS)
 
-cpp-test-framework: cpp_test_framework.cpp $(CPP_LIB) third_party/libprocess/libprocess.a
+cpp-test-framework: cpp_test_framework.cpp $(NEXUS_LIB) third_party/libprocess/libprocess.a
 	$(CXX) $(CXXFLAGS) -o $@ $< -L. $(LDFLAGS) -lnexus++ $(LIBS) 
 
-cpp-test-executor: cpp_test_executor.cpp $(CPP_LIB) third_party/libprocess/libprocess.a
+cpp-test-executor: cpp_test_executor.cpp $(NEXUS_LIB) third_party/libprocess/libprocess.a
 	$(CXX) $(CXXFLAGS) -o $@ $< -L. $(LDFLAGS) -lnexus++ $(LIBS) 
 
-memhog: memhog.cpp $(CPP_LIB) third_party/libprocess/libprocess.a
+memhog: memhog.cpp $(NEXUS_LIB) third_party/libprocess/libprocess.a
 	$(CXX) $(CXXFLAGS) -o $@ $< -L. $(LDFLAGS) -lnexus++ $(LIBS) 
 
-memhog-executor: memhog_executor.cpp $(CPP_LIB) third_party/libprocess/libprocess.a
+memhog-executor: memhog_executor.cpp $(NEXUS_LIB) third_party/libprocess/libprocess.a
 	$(CXX) $(CXXFLAGS) -o $@ $< -L. $(LDFLAGS) -lnexus++ $(LIBS) 
 
-java: swig/java/libnexus.so swig/java/nexus.jar swig/java/TestFramework.class swig/java/TestExecutor.class
+java: $(JAVA_LIB) swig/java/nexus.jar swig/java/TestFramework.class swig/java/TestExecutor.class
 
-python: swig/python/_nexus.so
+python: $(PYTHON_LIB)
 
-ruby: swig/ruby/nexus.so
+ruby: $(RUBY_LIB)
 
-swig/java/nexus.jar: swig/java/libnexus.so
+swig/java/nexus.jar: $(JAVA_LIB)
 ifdef JAVA_HOME
 	javac -sourcepath swig/java -d swig/java swig/java/nexus/*.java
 	jar cf $@ -C swig/java nexus
 endif
 
-swig/java/libnexus.so: swig/nexus.i $(CPP_LIB)
+$(JAVA_LIB): swig/nexus.i $(NEXUS_LIB)
 ifdef JAVA_HOME
 	rm -f swig/java/nexus/*
 	mkdir -p swig/java/nexus
@@ -207,23 +223,23 @@ ifdef JAVA_HOME
 	$(CXX) $(CXXFLAGS) -shared -o $@ swig/java/nexus_wrap.cpp -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(OS_NAME)
-L. $(LDFLAGS) -lnexus++ $(LIBS)
 endif
 
-swig/java/TestFramework.class: swig/java/libnexus.so swig/java/nexus.jar swig/java/TestFramework.java
+swig/java/TestFramework.class: $(JAVA_LIB) swig/java/nexus.jar swig/java/TestFramework.java
 ifdef JAVA_HOME
 	javac -cp swig/java/nexus.jar -sourcepath swig/java -d swig/java swig/java/TestFramework.java
 endif
 
-swig/java/TestExecutor.class: swig/java/libnexus.so swig/java/nexus.jar swig/java/TestExecutor.java
+swig/java/TestExecutor.class: $(JAVA_LIB) swig/java/nexus.jar swig/java/TestExecutor.java
 ifdef JAVA_HOME
 	javac -cp swig/java/nexus.jar -sourcepath swig/java -d swig/java swig/java/TestExecutor.java
 endif
 
-swig/python/_nexus.so: swig/nexus.i $(CPP_LIB)
+$(PYTHON_LIB): swig/nexus.i $(NEXUS_LIB)
 ifdef PYTHON_HEADERS
 	swig -c++ -python -threads -I../include -o swig/python/nexus_wrap.cpp -outdir swig/python
swig/nexus.i
 	$(CXX) $(CXXFLAGS) -shared -o $@ swig/python/nexus_wrap.cpp -I$(PYTHON_HEADERS) -L. $(LDFLAGS)
-lnexus++ $(LIBS)
 endif
 
-swig/ruby/nexus.so: swig/nexus.i $(CPP_LIB)
+$(RUBY_LIB): swig/nexus.i $(NEXUS_LIB)
 ifdef RUBY_HEADERS
 	swig -c++ -ruby -I../include -o swig/ruby/nexus_wrap.cpp -outdir swig/ruby -autorename swig/nexus.i
 	$(CXX) $(CXXFLAGS) -shared -o $@ swig/ruby/nexus_wrap.cpp -I$(RUBY_HEADERS) -L. $(LDFLAGS)
-lnexus++ $(LIBS)
@@ -247,14 +263,14 @@ clean:
 	$(MAKE) -C $(ZOOKEEPER) clean
 	rm -f $(patsubst %.o, %.d, $(ALL_OBJ))
 	rm -f $(ALL_OBJ)
-	rm -f *.o *.d *.so
 	rm -f $(NEXUS_LIBS)
 	rm -f $(NEXUS_EXES)
+	rm -f $(JAVA_LIB) $(PYTHON_LIB) $(RUBY_LIB)
+	rm -rf $(JAVA_LIB).dSYM $(PYTHON_LIB).dSYM $(RUBY_LIB).dSYM
 	rm -f swig/*/nexus_wrap.cpp
 	rm -f swig/*/nexus_wrap.h
 	rm -f swig/*/*.o
 	rm -f swig/*/*.d
-	rm -f swig/*/*.so
 	rm -f swig/java/nexus.jar
 	rm -f swig/java/nexus/*
 	rm -f swig/java/*.class



Mime
View raw message