You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ka...@apache.org on 2016/07/05 19:00:22 UTC

[02/12] mesos git commit: Enabled building libprocess without building 3rdparty first.

Enabled building libprocess without building 3rdparty first.

Doing a `make` inside libprocess would now automatically build bundled
dependencies.

Review: https://reviews.apache.org/r/47753/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/78deb535
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/78deb535
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/78deb535

Branch: refs/heads/master
Commit: 78deb535c0ebc6d89b4d0e11f76ed0395e5e6e68
Parents: da298d0
Author: Till Toenshoff <to...@me.com>
Authored: Tue Jul 5 14:21:20 2016 +0200
Committer: Kapil Arya <ka...@mesosphere.io>
Committed: Tue Jul 5 14:22:29 2016 -0400

----------------------------------------------------------------------
 3rdparty/libprocess/Makefile.am | 32 ++++++++++++++++++++++++++++----
 1 file changed, 28 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/78deb535/3rdparty/libprocess/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/Makefile.am b/3rdparty/libprocess/Makefile.am
index 05499a8..6efb1ee 100644
--- a/3rdparty/libprocess/Makefile.am
+++ b/3rdparty/libprocess/Makefile.am
@@ -34,19 +34,31 @@ GPERFTOOLS = ../gperftools-$(GPERFTOOLS_VERSION)
 GTEST = $(GMOCK)/gtest
 LIBEV = ../libev-$(LIBEV_VERSION)
 PICOJSON = ../picojson-$(PICOJSON_VERSION)
+PROTOBUF = ../protobuf-$(PROTOBUF_VERSION)
 
+# Dependencies for all-local.
+BUNDLED_DEPS = # Initialize BUNDLED_DEPENDENCIES so we can add to it.
+
+
+# Ensure bundled software is build properly.
+%-stamp:
+	@cd .. && $(MAKE) $(AM_MAKEFLAGS) $(@F)
 
 if WITH_BUNDLED_BOOST
 BOOST_INCLUDE_FLAGS = -isystem $(BOOST)
+BUNDLED_DEPS += $(BOOST)-stamp
 endif
 
 if WITH_BUNDLED_ELFIO
 ELFIO_INCLUDE_FLAGS = -I$(ELFIO)
+BUNDLED_DEPS += $(ELFIO)-stamp
 endif
 
 if WITH_BUNDLED_GLOG
 GLOG_INCLUDE_FLAGS = -I$(GLOG)/src
 LIB_GLOG = $(GLOG)/libglog.la
+$(LIB_GLOG): $(GLOG)-build-stamp
+BUNDLED_DEPS += $(GLOG)-build-stamp
 else
 LIB_GLOG = -lglog
 endif
@@ -55,17 +67,23 @@ if WITH_BUNDLED_GMOCK
 GMOCK_INCLUDE_FLAGS = -I$(GMOCK)/include
 GTEST_INCLUDE_FLAGS = -I$(GTEST)/include
 LIB_GMOCK = ../libgmock.la
+$(LIB_GMOCK): $(GMOCK)-build-stamp
+BUNDLED_DEPS += $(GMOCK)-build-stamp
 endif
 
 if HAS_GPERFTOOLS
 GPERFTOOLS_INCLUDE_FLAGS = -I$(GPERFTOOLS)/src
 LIB_GPERFTOOLS = $(GPERFTOOLS)/libprofiler.la
+$(LIB_GPERFTOOLS): $(GPERFTOOLS)-build-stamp
+BUNDLED_DEPS += $(GPERFTOOLS)-build-stamp
 endif
 
 if WITH_BUNDLED_HTTP_PARSER
 HTTP_PARSER = ../http-parser-$(HTTP_PARSER_VERSION)
 HTTP_PARSER_INCLUDE_FLAGS = -I$(HTTP_PARSER)
 LIB_HTTP_PARSER = ../libry_http_parser.la
+$(LIB_HTTP_PARSER): $(HTTP_PARSER)-build-stamp
+BUNDLED_DEPS += $(HTTP_PARSER)-build-stamp
 else
 LIB_HTTP_PARSER = -lhttp_parser
 endif
@@ -74,6 +92,8 @@ if !ENABLE_LIBEVENT
 if WITH_BUNDLED_LIBEV
 LIB_EV_INCLUDE_FLAGS = -I$(LIBEV)
 LIB_EV = $(LIBEV)/libev.la
+$(LIBEV): $(LIBEV)-build-stamp
+BUNDLED_DEPS += $(LIBEV)-build-stamp
 else
 LIB_EV = -lev
 endif
@@ -84,12 +104,18 @@ PICOJSON_INCLUDE_FLAGS =	\
   -D__STDC_FORMAT_MACROS
 if WITH_BUNDLED_PICOJSON
 PICOJSON_INCLUDE_FLAGS += -I$(PICOJSON)
+BUNDLED_DEPS += $(PICOJSON)-stamp
+endif
+
+if WITH_BUNDLED_PROTOBUF
+BUNDLED_DEPS += $(PROTOBUF)-build-stamp
 endif
 
 if WITH_BUNDLED_STOUT
 STOUT_INCLUDE_FLAGS = -I$(srcdir)/$(STOUT)/include
 endif
 
+
 # Library. It is not installable presently because most people link
 # the libprocess statically into their resulting library or binary and
 # don't want any parts of libprocess to get installed (which happens
@@ -262,6 +288,8 @@ libprocess_tests_LDADD +=		\
   $(LIB_EV)
 endif
 
+BUILT_SOURCES = $(BUNDLED_DEPS)
+
 # We use a check-local target for now to avoid the parallel test
 # runner that ships with newer versions of autotools.
 # See the following discussion for the workaround:
@@ -269,10 +297,6 @@ endif
 check-local: tests
 	./libprocess-tests
 
-# Both libprocess-tests and benchmarks have a dependency on libgmock.la.
-$(LIB_GMOCK):
-	@cd .. && $(MAKE) $(AM_MAKEFLAGS) libgmock.la
-
 tests: all libprocess-tests benchmarks
 
 # TODO(benh): Fix shared builds (tests need libglog, libev, etc).