Skip to content

Commit

Permalink
Moved 3rdparty packages from libprocess/3rdparty/ to 3rdparty/.
Browse files Browse the repository at this point in the history
  • Loading branch information
karya0 committed May 11, 2016
1 parent 66ad7f9 commit 9c2f44a
Show file tree
Hide file tree
Showing 22 changed files with 198 additions and 220 deletions.
173 changes: 154 additions & 19 deletions 3rdparty/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,82 @@

BUILT_SOURCES = # Initialized to enable using +=.

SUBDIRS = libprocess
SUBDIRS = . libprocess

# We need to add '--srcdir=.' needed because 'make distcheck' adds
# '--srcdir=...' when configuring.
CONFIGURE_ARGS = @CONFIGURE_ARGS@ --enable-shared=no --with-pic --srcdir=.

include versions.am

BOOST = boost-$(BOOST_VERSION)
GLOG = glog-$(GLOG_VERSION)
GMOCK = gmock-$(GMOCK_VERSION)
GPERFTOOLS = gperftools-$(GPERFTOOLS_VERSION)
GTEST = $(GMOCK)/gtest
HTTP_PARSER = http-parser-$(HTTP_PARSER_VERSION)
LEVELDB = leveldb-$(LEVELDB_VERSION)
LIBEV = libev-$(LIBEV_VERSION)
PIP = pip-$(PIP_VERSION)
PROTOBUF = protobuf-$(PROTOBUF_VERSION)
PICOJSON = picojson-$(PICOJSON_VERSION)
SETUPTOOLS = setuptools-$(SETUPTOOLS_VERSION)
WHEEL = wheel-$(WHEEL_VERSION)
ZOOKEEPER = zookeeper-$(ZOOKEEPER_VERSION)


EXTRA_DIST = \
$(BOOST).tar.gz \
$(GLOG).tar.gz \
$(GMOCK).tar.gz \
$(GPERFTOOLS).tar.gz \
$(HTTP_PARSER).tar.gz \
$(LEVELDB).tar.gz \
$(LIBEV).tar.gz \
$(PIP).tar.gz \
$(PROTOBUF).tar.gz \
$(PICOJSON).tar.gz \
$(SETUPTOOLS).tar.gz \
$(WHEEL).tar.gz \
$(ZOOKEEPER).tar.gz

# We need to patch glog in order to deal with a compilation issue when
# compiling with clang (and C++11); see MESOS-860, MESOS-966.
EXTRA_DIST += \
$(GLOG).patch

# We patch http-parser to avoid a name collision with our `flags` namespace.
EXTRA_DIST += \
$(HTTP_PARSER).patch

# We need to patch leveldb to prevent it from linking to snappy and
# tcmalloc; see MESOS-1054, MESOS-1624.
EXTRA_DIST += \
$(LEVELDB).patch

# We patch libev to keep it from reaping child processes.
EXTRA_DIST += \
$(LIBEV).patch

# We include an upstream patch for protobuf in order to avoid
# signed/unsigned comparisons.
EXTRA_DIST += \
$(PROTOBUF).patch

# We need to patch ZooKeeper in order to get 3.4.8 to compile on PPC LE.
EXTRA_DIST += \
$(ZOOKEEPER).patch

CLEAN_EXTRACTED = \
$(BOOST) \
$(GLOG) \
$(GMOCK) \
$(GPERFTOOLS) \
$(HTTP_PARSER) \
$(LEVELDB) \
$(LIBEV) \
$(PIP) \
$(PICOJSON) \
$(PROTOBUF) \
$(SETUPTOOLS) \
$(WHEEL) \
$(ZOOKEEPER)
Expand All @@ -74,41 +116,134 @@ CLEAN_EXTRACTED = \
ALL_LOCAL = # Initialize ALL_LOCAL so we can add to it.

if HAS_PYTHON
if WITH_BUNDLED_SETUPTOOLS
ALL_LOCAL += $(SETUPTOOLS)-stamp
endif

if WITH_BUNDLED_PIP
ALL_LOCAL += $(PIP)-stamp
endif

if WITH_BUNDLED_SETUPTOOLS
ALL_LOCAL += $(SETUPTOOLS)-stamp
endif

if WITH_BUNDLED_WHEEL
ALL_LOCAL += $(WHEEL)-stamp
endif
endif

if WITH_BUNDLED_LEVELDB
if WITH_BUNDLED_BOOST
ALL_LOCAL += $(BOOST)-stamp
endif

if WITH_BUNDLED_GLOG
LIB_GLOG = $(GLOG)/libglog.la
GLOG_LDFLAGS = # Initialize to empty
if OS_FREEBSD
GLOG_LDFLAGS += "LDFLAGS='-L/usr/local/lib -lexecinfo'"
endif

# TODO(charles): Figure out PIC options in our configure.ac or create
# a configure.ac for leveldb.
$(LEVELDB)/libleveldb.a: $(LEVELDB)-stamp
# NOTE: We explicitly set GTEST_CONFIG=no so that we don't attempt to
# build glog against a system installed gtest (there's no reason to
# "test" glog and it's highly likely it will cause a compilation bug
# when building with clang).
$(LIB_GLOG): $(GLOG)-stamp
cd $(GLOG) && ./configure GTEST_CONFIG=no $(CONFIGURE_ARGS) && \
$(MAKE) $(AM_MAKEFLAGS) $(GLOG_LDFLAGS)

ALL_LOCAL += $(LIB_GLOG)
endif

if HAS_GPERFTOOLS
LIB_GPERFTOOLS = $(GPERFTOOLS)/libprofiler.la

$(LIB_GPERFTOOLS): $(GPERFTOOLS)-build-stamp

$(GPERFTOOLS)-build-stamp: $(GPERFTOOLS)-stamp
cd $(GPERFTOOLS) && ./configure $(CONFIGURE_ARGS) && \
$(MAKE) $(AM_MAKEFLAGS)
touch $@

ALL_LOCAL += $(LIB_GPERFTOOLS)
endif


if WITH_BUNDLED_HTTP_PARSER
# Convenience library for nodejs/http-parser.
noinst_LTLIBRARIES = libry_http_parser.la
nodist_libry_http_parser_la_SOURCES = $(HTTP_PARSER)/http_parser.c
libry_http_parser_la_CPPFLAGS = -I$(HTTP_PARSER) -DHTTP_PARSER_STRICT=0

BUILT_SOURCES += $(nodist_libry_http_parser_la_SOURCES)

$(HTTP_PARSER)/http_parser.c: $(HTTP_PARSER)-stamp
endif

if WITH_BUNDLED_LIBEV
$(LIBEV)/libev.la: $(LIBEV)-stamp
cd $(LIBEV) && ./configure $(CONFIGURE_ARGS) && \
$(MAKE) $(AM_MAKEFLAGS)
ALL_LOCAL += $(LIBEV)/libev.la
endif

if WITH_BUNDLED_PICOJSON
# Stout depends on <picojson.h>. Install picojson.h into $PREFIX/include
# but don't add it to the source tarball.
nodist_include_HEADERS = $(PICOJSON)/picojson.h
$(PICOJSON)/picojson.h: $(PICOJSON)-stamp
ALL_LOCAL += $(PICOJSON)-stamp
endif


if WITH_BUNDLED_PROTOBUF
$(PROTOBUF)/src/protoc $(PROTOBUF)/src/libprotobuf.la: $(PROTOBUF)-build-stamp

$(PROTOBUF)-build-stamp: $(PROTOBUF)-stamp
cd $(PROTOBUF) && ./configure $(CONFIGURE_ARGS) && \
$(MAKE) $(AM_MAKEFLAGS)
touch $@
ALL_LOCAL += $(PROTOBUF)/src/libprotobuf.la
ALL_LOCAL += $(PROTOBUF)/src/protoc
endif

# Convenience library for gmock/gtest.
check_LTLIBRARIES = libgmock.la
nodist_libgmock_la_SOURCES = gmock_sources.cc

if WITH_BUNDLED_GMOCK
libgmock_la_CPPFLAGS = \
-I$(GTEST)/include -I$(GTEST) -I$(GTEST)/src \
-I$(GMOCK)/include -I$(GMOCK) -I$(GMOCK)/src

gmock_sources.cc: $(GMOCK)-stamp
endif

if LINKGTEST
libgmock_la_LIBADD = -lgtest
endif


# We list the sources in BUILT_SOURCES to make sure that the package
# gets unarchived first.
BUILT_SOURCES += $(nodist_libgmock_la_SOURCES)

if WITH_BUNDLED_LEVELDB
# TODO(charles): Figure out PIC options in our configure.ac or create
# a configure.ac for leveldb.
$(LEVELDB)/libleveldb.a: $(LEVELDB)-stamp
cd $(LEVELDB) && \
$(MAKE) $(AM_MAKEFLAGS) CC="$(CC)" CXX="$(CXX)" OPT="$(CXXFLAGS) -fPIC"
$(MAKE) $(AM_MAKEFLAGS) CC="$(CC)" CXX="$(CXX)" OPT="$(CXXFLAGS) -fPIC"

ALL_LOCAL += $(LEVELDB)/libleveldb.a
ALL_LOCAL += $(LEVELDB)/libleveldb.a
endif

if WITH_BUNDLED_ZOOKEEPER

$(ZOOKEEPER)/src/c/libzookeeper_mt.la: $(ZOOKEEPER)-stamp
$(ZOOKEEPER)/src/c/libzookeeper_mt.la: $(ZOOKEEPER)-stamp
cd $(ZOOKEEPER)/src/c && ./configure $(CONFIGURE_ARGS) && \
$(MAKE) $(AM_MAKEFLAGS)

ALL_LOCAL += $(ZOOKEEPER)/src/c/libzookeeper_mt.la
ALL_LOCAL += $(ZOOKEEPER)/src/c/libzookeeper_mt.la
else
# No matter what, we need to extract ZooKeeper so that we can run
# 'make check' (some of our tests need the ZooKeeper JAR).
ALL_LOCAL += $(ZOOKEEPER)-stamp
# No matter what, we need to extract ZooKeeper so that we can run
# 'make check' (some of our tests need the ZooKeeper JAR).
ALL_LOCAL += $(ZOOKEEPER)-stamp
endif

all-local: $(ALL_LOCAL)
Expand All @@ -117,5 +252,5 @@ clean-local:
rm -r -f $(CLEAN_EXTRACTED)
rm -f *-stamp

tests: all
tests: all $(check_LTLIBRARIES)
@cd libprocess && $(MAKE) $(AM_MAKEFLAGS) tests
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 9c2f44a

Please sign in to comment.