Repository: mesos Updated Branches: refs/heads/master 9f6c18d8d -> 485842870
Fixed an include path for installed headers. Review: https://reviews.apache.org/r/22715 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/48584287 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/48584287 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/48584287 Branch: refs/heads/master Commit: 485842870e64825ffb97b0593a44ee616211692e Parents: 9f6c18d Author: Benjamin Mahler <[email protected]> Authored: Tue Jun 17 18:48:55 2014 -0700 Committer: Benjamin Mahler <[email protected]> Committed: Fri Jun 20 14:04:20 2014 -0700 ---------------------------------------------------------------------- include/mesos/containerizer/containerizer.hpp | 2 +- include/mesos/mesos.hpp.in | 2 +- include/mesos/scheduler/scheduler.hpp | 2 +- src/Makefile.am | 24 ++++++++++++++++------ src/python/setup.py.in | 2 ++ 5 files changed, 23 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/48584287/include/mesos/containerizer/containerizer.hpp ---------------------------------------------------------------------- diff --git a/include/mesos/containerizer/containerizer.hpp b/include/mesos/containerizer/containerizer.hpp index aefdb6f..9bf76e0 100644 --- a/include/mesos/containerizer/containerizer.hpp +++ b/include/mesos/containerizer/containerizer.hpp @@ -20,6 +20,6 @@ #define __CONTAINERIZER_PROTO_HPP__ // ONLY USEFUL AFTER RUNNING PROTOC. -#include <containerizer/containerizer.pb.h> +#include <mesos/containerizer/containerizer.pb.h> #endif // __CONTAINERIZER_PROTO_HPP__ http://git-wip-us.apache.org/repos/asf/mesos/blob/48584287/include/mesos/mesos.hpp.in ---------------------------------------------------------------------- diff --git a/include/mesos/mesos.hpp.in b/include/mesos/mesos.hpp.in index 2d4310c..8aedf8c 100644 --- a/include/mesos/mesos.hpp.in +++ b/include/mesos/mesos.hpp.in @@ -19,7 +19,7 @@ #ifndef __MESOS_HPP__ #define __MESOS_HPP__ -#include <mesos.pb.h> // ONLY USEFUL AFTER RUNNING PROTOC. +#include <mesos/mesos.pb.h> // ONLY USEFUL AFTER RUNNING PROTOC. #define MESOS_VERSION "@PACKAGE_VERSION@" http://git-wip-us.apache.org/repos/asf/mesos/blob/48584287/include/mesos/scheduler/scheduler.hpp ---------------------------------------------------------------------- diff --git a/include/mesos/scheduler/scheduler.hpp b/include/mesos/scheduler/scheduler.hpp index 7aebebf..5c31191 100644 --- a/include/mesos/scheduler/scheduler.hpp +++ b/include/mesos/scheduler/scheduler.hpp @@ -20,6 +20,6 @@ #define __SCHEDULER_PROTO_HPP__ // ONLY USEFUL AFTER RUNNING PROTOC. -#include <scheduler/scheduler.pb.h> +#include <mesos/scheduler/scheduler.pb.h> #endif // __SCHEDULER_PROTO_HPP__ http://git-wip-us.apache.org/repos/asf/mesos/blob/48584287/src/Makefile.am ---------------------------------------------------------------------- diff --git a/src/Makefile.am b/src/Makefile.am index b1b7d2d..fd2c80f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -81,11 +81,16 @@ MESOS_CPPFLAGS += -I$(top_srcdir)/include MESOS_CPPFLAGS += -I$(top_srcdir)/$(LIBPROCESS)/include MESOS_CPPFLAGS += -I$(top_srcdir)/$(STOUT)/include MESOS_CPPFLAGS += -I../include + +# Protobuf headers that depend on mesos.pb.h need this. +MESOS_CPPFLAGS += -I../include/mesos + MESOS_CPPFLAGS += -I../$(BOOST) MESOS_CPPFLAGS += -I../$(PROTOBUF)/src MESOS_CPPFLAGS += -I../$(PICOJSON) MESOS_CPPFLAGS += -I../$(GLOG)/src + if WITH_BUNDLED_LEVELDB MESOS_CPPFLAGS += -I../$(LEVELDB)/include endif @@ -155,17 +160,24 @@ BUILT_SOURCES += $(REGISTRY_PROTOS) CLEANFILES += $(REGISTRY_PROTOS) # Targets for generating protocol buffer code. +# For the include headers, place the header files in the include +# directory and leave the cc files in src. %.pb.cc %.pb.h: $(top_srcdir)/include/mesos/%.proto $(MKDIR_P) $(@D) - $(PROTOC) $(PROTOCFLAGS) --cpp_out=. $^ + $(PROTOC) $(PROTOCFLAGS) --cpp_out=../include/mesos $^ + mv ../include/mesos/*.pb.cc . containerizer/%.pb.cc containerizer/%.pb.h: $(CONTAINERIZER_PROTO) $(MKDIR_P) $(@D) - $(PROTOC) $(PROTOCFLAGS) --cpp_out=. $^ + $(MKDIR_P) ../include/mesos/containerizer + $(PROTOC) $(PROTOCFLAGS) --cpp_out=../include/mesos $^ + mv ../include/mesos/containerizer/*.pb.cc $(@D) scheduler/%.pb.cc scheduler/%.pb.h: $(SCHEDULER_PROTO) $(MKDIR_P) $(@D) - $(PROTOC) $(PROTOCFLAGS) --cpp_out=. $^ + $(MKDIR_P) ../include/mesos/scheduler + $(PROTOC) $(PROTOCFLAGS) --cpp_out=../include/mesos $^ + mv ../include/mesos/scheduler/*.pb.cc $(@D) %.pb.cc %.pb.h: %.proto $(MKDIR_P) $(@D) @@ -267,7 +279,7 @@ pkginclude_HEADERS = \ nodist_pkginclude_HEADERS = \ ../include/mesos/mesos.hpp \ - mesos.pb.h + ../include/mesos/mesos.pb.h containerizerdir = $(pkgincludedir)/containerizer @@ -275,7 +287,7 @@ containerizer_HEADERS = \ $(top_srcdir)/include/mesos/containerizer/containerizer.hpp \ $(top_srcdir)/include/mesos/containerizer/containerizer.proto -nodist_containerizer_HEADERS = containerizer/containerizer.pb.h +nodist_containerizer_HEADERS = ../include/mesos/containerizer/containerizer.pb.h schedulerdir = $(pkgincludedir)/scheduler @@ -283,7 +295,7 @@ scheduler_HEADERS = \ $(top_srcdir)/include/mesos/scheduler/scheduler.hpp \ $(top_srcdir)/include/mesos/scheduler/scheduler.proto -nodist_scheduler_HEADERS = scheduler/scheduler.pb.h +nodist_scheduler_HEADERS = ../include/mesos/scheduler/scheduler.pb.h if OS_LINUX libmesos_no_3rdparty_la_SOURCES += linux/cgroups.cpp http://git-wip-us.apache.org/repos/asf/mesos/blob/48584287/src/python/setup.py.in ---------------------------------------------------------------------- diff --git a/src/python/setup.py.in b/src/python/setup.py.in index 0c6e264..b996dfe 100644 --- a/src/python/setup.py.in +++ b/src/python/setup.py.in @@ -62,6 +62,8 @@ SOURCES = [ INCLUDE_DIRS = [ os.path.join(abs_top_srcdir, 'include'), os.path.join(abs_top_builddir, 'include'), + # Needed for the *.pb.h protobuf includes. + os.path.join(abs_top_builddir, 'include', 'mesos'), os.path.join(abs_top_builddir, 'src'), os.path.join(abs_top_builddir, src_python_native), os.path.join(abs_top_builddir, protobuf, 'src'),
