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 2012/02/01 22:00:12 UTC
svn commit: r1239321 - in /incubator/mesos/trunk: ./ src/common/ src/config/
src/detector/ src/log/ src/master/ src/slave/ src/tests/
Author: benh
Date: Wed Feb 1 21:00:12 2012
New Revision: 1239321
URL: http://svn.apache.org/viewvc?rev=1239321&view=rev
Log:
Change how we use the AC_SUBST WEBUI variable so you can build without the webui.
Removed:
incubator/mesos/trunk/src/config/config.hpp.in
Modified:
incubator/mesos/trunk/configure.ac
incubator/mesos/trunk/src/common/webui_utils.cpp
incubator/mesos/trunk/src/common/webui_utils.hpp
incubator/mesos/trunk/src/detector/detector.cpp
incubator/mesos/trunk/src/log/network.hpp
incubator/mesos/trunk/src/master/master.cpp
incubator/mesos/trunk/src/master/slaves_manager.cpp
incubator/mesos/trunk/src/master/webui.cpp
incubator/mesos/trunk/src/master/webui.hpp
incubator/mesos/trunk/src/slave/webui.cpp
incubator/mesos/trunk/src/slave/webui.hpp
incubator/mesos/trunk/src/tests/sample_frameworks_tests.cpp
Modified: incubator/mesos/trunk/configure.ac
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/configure.ac?rev=1239321&r1=1239320&r2=1239321&view=diff
==============================================================================
--- incubator/mesos/trunk/configure.ac (original)
+++ incubator/mesos/trunk/configure.ac Wed Feb 1 21:00:12 2012
@@ -67,7 +67,6 @@ AC_CONFIG_SUBDIRS([third_party/glog-0.3.
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([src/Makefile])
-AC_CONFIG_FILES([src/config/config.hpp])
AC_CONFIG_FILES([bin/mesos-build-env.sh])
AC_CONFIG_FILES([bin/mesos-master.sh], [chmod +x bin/mesos-master.sh])
AC_CONFIG_FILES([bin/mesos-slave.sh], [chmod +x bin/mesos-slave.sh])
@@ -274,7 +273,8 @@ __EOF__
[chmod +x src/examples/java/test-multiple-executors-framework])
AC_CONFIG_FILES([src/java/mesos.pom])
- AC_SUBST([HAS_JAVA], [1]) # Used to decide whether to run Java tests.
+ AC_DEFINE([MESOS_HAS_JAVA])
+
has_java=yes
fi
@@ -306,7 +306,9 @@ if test "x$enable_python" = "xyes"; then
AC_SUBST([PYTHON_EGG_POSTFIX])
AC_SUBST([PYTHON_EGG_PUREPY_POSTFIX])
AC_SUBST([PYTHON]) # Used by the example shell scripts and src/Makefile.am.
- AC_SUBST([HAS_PYTHON], [1]) # Used to decide whether to run Python tests.
+
+ AC_DEFINE([MESOS_HAS_PYTHON])
+
has_python=yes
fi
@@ -336,7 +338,9 @@ if test "x$enable_webui" = "xyes"; then
AC_SUBST([WEBUI_CPPFLAGS])
AC_SUBST([WEBUI_LDFLAGS])
- AC_SUBST([WEBUI], [1]) # Used to conditionally include code.
+
+ AC_DEFINE([MESOS_WEBUI])
+
webui=yes
fi
Modified: incubator/mesos/trunk/src/common/webui_utils.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/common/webui_utils.cpp?rev=1239321&r1=1239320&r2=1239321&view=diff
==============================================================================
--- incubator/mesos/trunk/src/common/webui_utils.cpp (original)
+++ incubator/mesos/trunk/src/common/webui_utils.cpp Wed Feb 1 21:00:12 2012
@@ -1,16 +1,14 @@
-#include <tr1/functional>
+#ifdef MESOS_WEBUI
+
+#include <Python.h>
-#include "config/config.hpp"
+#include <tr1/functional>
#include "common/strings.hpp"
#include "common/thread.hpp"
#include "common/utils.hpp"
#include "common/webui_utils.hpp"
-#ifdef MESOS_WEBUI // Must be checked after including config/config.hpp.
-
-#include <Python.h> // Only attempt to include if building the webui.
-
namespace mesos {
namespace internal {
namespace utils {
Modified: incubator/mesos/trunk/src/common/webui_utils.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/common/webui_utils.hpp?rev=1239321&r1=1239320&r2=1239321&view=diff
==============================================================================
--- incubator/mesos/trunk/src/common/webui_utils.hpp (original)
+++ incubator/mesos/trunk/src/common/webui_utils.hpp Wed Feb 1 21:00:12 2012
@@ -1,13 +1,13 @@
#ifndef __COMMON_WEBUI_UTILS_HPP__
#define __COMMON_WEBUI_UTILS_HPP__
+#ifdef MESOS_WEBUI
+
#include <string>
#include <vector>
#include "configurator/configuration.hpp"
-#ifdef MESOS_WEBUI
-
namespace mesos {
namespace internal {
namespace utils {
Modified: incubator/mesos/trunk/src/detector/detector.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/detector/detector.cpp?rev=1239321&r1=1239320&r2=1239321&view=diff
==============================================================================
--- incubator/mesos/trunk/src/detector/detector.cpp (original)
+++ incubator/mesos/trunk/src/detector/detector.cpp Wed Feb 1 21:00:12 2012
@@ -24,8 +24,6 @@
#include <process/protobuf.hpp>
-#include "config/config.hpp"
-
#include "common/fatal.hpp"
#include "common/foreach.hpp"
Modified: incubator/mesos/trunk/src/log/network.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/log/network.hpp?rev=1239321&r1=1239320&r2=1239321&view=diff
==============================================================================
--- incubator/mesos/trunk/src/log/network.hpp (original)
+++ incubator/mesos/trunk/src/log/network.hpp Wed Feb 1 21:00:12 2012
@@ -30,8 +30,6 @@
#include <process/protobuf.hpp>
#include <process/timeout.hpp>
-#include "config/config.hpp"
-
#include "common/foreach.hpp"
#include "common/lambda.hpp"
#include "common/seconds.hpp"
Modified: incubator/mesos/trunk/src/master/master.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.cpp?rev=1239321&r1=1239320&r2=1239321&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.cpp (original)
+++ incubator/mesos/trunk/src/master/master.cpp Wed Feb 1 21:00:12 2012
@@ -26,8 +26,6 @@
#include <process/run.hpp>
#include <process/timer.hpp>
-#include "config/config.hpp"
-
#include "common/build.hpp"
#include "common/date_utils.hpp"
#include "common/utils.hpp"
Modified: incubator/mesos/trunk/src/master/slaves_manager.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/slaves_manager.cpp?rev=1239321&r1=1239320&r2=1239321&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/slaves_manager.cpp (original)
+++ incubator/mesos/trunk/src/master/slaves_manager.cpp Wed Feb 1 21:00:12 2012
@@ -25,8 +25,6 @@
#include <process/dispatch.hpp>
-#include "config/config.hpp"
-
#include "common/fatal.hpp"
#include "common/strings.hpp"
Modified: incubator/mesos/trunk/src/master/webui.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/webui.cpp?rev=1239321&r1=1239320&r2=1239321&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/webui.cpp (original)
+++ incubator/mesos/trunk/src/master/webui.cpp Wed Feb 1 21:00:12 2012
@@ -16,6 +16,8 @@
* limitations under the License.
*/
+#ifdef MESOS_WEBUI
+
#include <process/process.hpp>
#include "master/webui.hpp"
@@ -23,8 +25,6 @@
#include "common/utils.hpp"
#include "common/webui_utils.hpp"
-#ifdef MESOS_WEBUI
-
namespace mesos {
namespace internal {
namespace master {
Modified: incubator/mesos/trunk/src/master/webui.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/webui.hpp?rev=1239321&r1=1239320&r2=1239321&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/webui.hpp (original)
+++ incubator/mesos/trunk/src/master/webui.hpp Wed Feb 1 21:00:12 2012
@@ -19,15 +19,12 @@
#ifndef __MASTER_WEBUI_HPP__
#define __MASTER_WEBUI_HPP__
+#ifdef MESOS_WEBUI
+
#include <process/process.hpp>
#include "master.hpp"
-#include "config/config.hpp"
-
-
-#ifdef MESOS_WEBUI
-
namespace mesos {
namespace internal {
namespace master {
Modified: incubator/mesos/trunk/src/slave/webui.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/webui.cpp?rev=1239321&r1=1239320&r2=1239321&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/webui.cpp (original)
+++ incubator/mesos/trunk/src/slave/webui.cpp Wed Feb 1 21:00:12 2012
@@ -16,6 +16,8 @@
* limitations under the License.
*/
+#ifdef MESOS_WEBUI
+
#include <process/process.hpp>
#include "slave/webui.hpp"
@@ -26,8 +28,6 @@
#include "configurator/configuration.hpp"
-#ifdef MESOS_WEBUI
-
namespace mesos {
namespace internal {
namespace slave {
Modified: incubator/mesos/trunk/src/slave/webui.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/webui.hpp?rev=1239321&r1=1239320&r2=1239321&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/webui.hpp (original)
+++ incubator/mesos/trunk/src/slave/webui.hpp Wed Feb 1 21:00:12 2012
@@ -19,15 +19,12 @@
#ifndef __SLAVE_WEBUI_HPP__
#define __SLAVE_WEBUI_HPP__
+#ifdef MESOS_WEBUI
+
#include <process/process.hpp>
#include "slave.hpp"
-#include "config/config.hpp"
-
-
-#ifdef MESOS_WEBUI
-
namespace mesos {
namespace internal {
namespace slave {
Modified: incubator/mesos/trunk/src/tests/sample_frameworks_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/sample_frameworks_tests.cpp?rev=1239321&r1=1239320&r2=1239321&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/sample_frameworks_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/sample_frameworks_tests.cpp Wed Feb 1 21:00:12 2012
@@ -18,19 +18,17 @@
#include <gtest/gtest.h>
-#include "config/config.hpp"
-
#include "tests/external_test.hpp"
// Run each of the sample frameworks in local mode.
TEST_EXTERNAL(SampleFrameworks, CppFramework)
-#if MESOS_HAS_JAVA
+#ifdef MESOS_HAS_JAVA
TEST_EXTERNAL(SampleFrameworks, JavaFramework)
TEST_EXTERNAL(SampleFrameworks, JavaExceptionFramework)
#endif
-#if MESOS_HAS_PYTHON
+#ifdef MESOS_HAS_PYTHON
TEST_EXTERNAL(SampleFrameworks, PythonFramework)
#endif