]> git.proxmox.com Git - mirror_frr.git/commitdiff
build: fix protobuf out-of-tree build
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 21 Apr 2021 09:12:53 +0000 (11:12 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 21 Apr 2021 09:13:25 +0000 (11:13 +0200)
Otherwise it aborts with "File does not reside within any path specified
using --proto_path (or -I)"

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
grpc/subdir.am
qpb/subdir.am

index 045848aee7f18c0c36622f2f16f6398a60bb6c5a..d9ec365ba841ef37ad16899506dde7142f6e2945 100644 (file)
@@ -23,12 +23,12 @@ EXTRA_DIST += grpc/frr-northbound.proto
 
 AM_V_PROTOC = $(am__v_PROTOC_$(V))
 am__v_PROTOC_ = $(am__v_PROTOC_$(AM_DEFAULT_VERBOSITY))
-am__v_PROTOC_0 = @echo "  PROTOC" $@;
+am__v_PROTOC_0 = @echo "  PROTOC  " $@;
 am__v_PROTOC_1 =
 
 SUFFIXES += .pb.h .pb.cc .grpc.pb.cc
 
 .proto.pb.cc:
-       $(AM_V_PROTOC)$(PROTOC) -I$(top_srcdir) --cpp_out=$(top_srcdir) $(top_srcdir)/$^
+       $(AM_V_PROTOC)$(PROTOC) -I$(top_srcdir) --cpp_out=$(top_builddir) $^
 .proto.grpc.pb.cc:
-       $(AM_V_PROTOC)$(PROTOC) -I$(top_srcdir) --grpc_out=$(top_srcdir) --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` $(top_srcdir)/$^
+       $(AM_V_PROTOC)$(PROTOC) -I$(top_srcdir) --grpc_out=$(top_builddir) --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` $^
index 80f8f3aca9272457b6f74ed87f0fc604578fa806..4f826355d9241ad2f20243c83e162f492c252bf5 100644 (file)
@@ -35,7 +35,7 @@ if HAVE_PROTOBUF
 
 # Rules
 .proto.pb.h:
-       $(PROTOC) -I$(top_srcdir) --cpp_out=$(top_srcdir) $(top_srcdir)/$^
+       $(PROTOC) -I$(top_srcdir) --cpp_out=$(top_builddir) $^
 
 AM_V_PROTOC_C = $(am__v_PROTOC_C_$(V))
 am__v_PROTOC_C_ = $(am__v_PROTOC_C_$(AM_DEFAULT_VERBOSITY))
@@ -43,7 +43,7 @@ am__v_PROTOC_C_0 = @echo "  PROTOC_C" $@;
 am__v_PROTOC_C_1 =
 
 .proto.pb-c.c:
-       $(AM_V_PROTOC_C)$(PROTOC_C) -I$(top_srcdir) --c_out=$(top_srcdir) $(top_srcdir)/$^
+       $(AM_V_PROTOC_C)$(PROTOC_C) -I$(top_srcdir) --c_out=$(top_builddir) $^
 .pb-c.c.pb-c.h:
        @/bin/true