This is an automated email from the ASF dual-hosted git repository.

jpeach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
     new e306503  Fixed the CSI protobuf build dependencies.
e306503 is described below

commit e306503c0395e7dc4abfd29d555635b16f52ed2f
Author: James Peach <[email protected]>
AuthorDate: Tue Sep 18 14:03:13 2018 -0700

    Fixed the CSI protobuf build dependencies.
    
    Generating the CSI protobufs depends on the `$(builddir)/include/csi`
    directory being created at configuration time. This only happens
    when automake build dependencies are enabled, however. In some
    distributions, rpmbuild will pass `--disable-dependency-tracking`,
    which will disable automake dependency tracking and prevent this
    directory being created. The fix is to simply ensure the CSI protobuf
    generation rules create the output directory as necessary.
    
    Review: https://reviews.apache.org/r/68749/
---
 Makefile.am     | 5 +++++
 src/Makefile.am | 8 +++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 25028a9..11192ac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -50,6 +50,11 @@ EXTRA_DIST += bootstrap LICENSE NOTICE README.md     \
 # libraries and only those libraries.
 AM_DISTCHECK_CONFIGURE_FLAGS = --disable-python-dependency-install
 
+# In some distributions, rpmbuild(8) will implicitly disable dependency
+# tracking. Make sure we disable it in during distcheck to ensure we do not
+# accidentally depend on the side-effects of automake dependency tracking.
+AM_DISTCHECK_CONFIGURE_FLAGS += --disable-dependency-tracking
+
 
 # MPI framework.
 EXTRA_DIST += mpi/README mpi/mpiexec-mesos.in mpi/mpiexec-mesos.py
diff --git a/src/Makefile.am b/src/Makefile.am
index b0d63e2..5795c70 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -476,13 +476,15 @@ CLEANFILES +=                                             
                \
 ../include/mesos/%.pb.cc ../include/mesos/%.pb.h: 
$(top_srcdir)/include/mesos/%.proto
        $(PROTOC) $(PROTOCFLAGS) --cpp_out=../include $^
 
-../include/csi/%.pb.cc ../include/csi/%.pb.h: ../$(CSI)/%.proto
-       $(PROTOC) $(PROTOCFLAGS) --cpp_out=../include/csi $^
-
 %.pb.cc %.pb.h: %.proto
        $(PROTOC) $(PROTOCFLAGS) --cpp_out=. $^
 
+../include/csi/%.pb.cc ../include/csi/%.pb.h: ../$(CSI)/%.proto
+       $(MKDIR_P) $(@D)
+       $(PROTOC) $(PROTOCFLAGS) --cpp_out=../include/csi $^
+
 ../include/csi/%.grpc.pb.cc ../include/csi/%.grpc.pb.h: ../$(CSI)/%.proto
+       $(MKDIR_P) $(@D)
        $(PROTOC) $(PROTOCFLAGS) --grpc_out=../include/csi $^           \
                  --plugin=protoc-gen-grpc=$(GRPC_CPP_PLUGIN)
 

Reply via email to