1
1
# TODO(jmacd): Replace the proto-generation rule with one using the protoc docker image.
2
- PROTOC = protoc
3
- PROTO_SRC = $(top_srcdir ) /lightstep-tracer-common
2
+ PROTOC = @PROTOC@
3
+ COLLECTOR_SRC = $(top_srcdir ) /lightstep-tracer-common
4
4
ENVOY_SRC = ./envoy
5
- PROTO_OUT = proto
5
+ PROTO_DIR = proto
6
+
7
+ PROTO_SRC = \
8
+ $(COLLECTOR_SRC ) /collector.proto \
9
+ $(ENVOY_SRC ) /envoy_carrier.proto
10
+
11
+ PROTO_GEN = \
12
+ lightstep/collector.grpc.pb.h \
13
+ lightstep/collector.pb.h \
14
+ lightstep/envoy_carrier.pb.h \
15
+ proto/collector.grpc.pb.cc \
16
+ proto/collector.pb.cc \
17
+ proto/envoy_carrier.pb.cc
18
+
19
+ CLEANFILES = $(PROTO_GEN )
6
20
7
21
.PHONY : proto
8
22
9
23
AM_CXXFLAGS = -Wno-deprecated-declarations
10
24
11
- proto :
12
- mkdir -p $(PROTO_OUT )
13
- $(PROTOC ) --proto_path=$(PROTO_SRC ) --grpc_out=$(PROTO_OUT ) --plugin=protoc-gen-grpc=` which grpc_cpp_plugin` $(PROTO_SRC ) /collector.proto
14
- $(PROTOC ) --proto_path=$(PROTO_SRC ) --cpp_out=$(PROTO_OUT ) $(PROTO_SRC ) /collector.proto
15
- $(PROTOC ) --proto_path=$(ENVOY_SRC ) --cpp_out=$(PROTO_OUT ) $(ENVOY_SRC ) /envoy_carrier.proto
25
+ $( PROTO_GEN ) : $( PROTO_SRC ) $( PROTOC )
26
+ mkdir -p $(PROTO_DIR )
27
+ $(PROTOC ) --proto_path=$(COLLECTOR_SRC ) --grpc_out=$(PROTO_DIR ) --plugin=protoc-gen-grpc=` which grpc_cpp_plugin` $(COLLECTOR_SRC ) /collector.proto
28
+ $(PROTOC ) --proto_path=$(COLLECTOR_SRC ) --cpp_out=$(PROTO_DIR ) $(COLLECTOR_SRC ) /collector.proto
29
+ $(PROTOC ) --proto_path=$(ENVOY_SRC ) --cpp_out=$(PROTO_DIR ) $(ENVOY_SRC ) /envoy_carrier.proto
16
30
mv proto/* .h lightstep
17
31
32
+ BUILT_SOURCES = $(PROTO_GEN )
33
+
18
34
lib_LTLIBRARIES = liblightstep_core_cxx11.la
19
35
20
36
nobase_include_HEADERS = \
21
- lightstep/collector.grpc.pb.h \
22
- lightstep/collector.pb.h \
23
- lightstep/envoy_carrier.pb.h \
24
37
lightstep/envoy.h \
25
38
lightstep/impl.h \
26
39
lightstep/options.h \
@@ -33,6 +46,11 @@ nobase_include_HEADERS = \
33
46
mapbox_variant/recursive_wrapper.hpp \
34
47
mapbox_variant/variant.hpp
35
48
49
+ nobase_nodist_include_HEADERS = \
50
+ lightstep/collector.grpc.pb.h \
51
+ lightstep/collector.pb.h \
52
+ lightstep/envoy_carrier.pb.h
53
+
36
54
EXTRA_DIST = \
37
55
mapbox_variant/LICENSE \
38
56
envoy/envoy_carrier.proto
@@ -41,7 +59,9 @@ liblightstep_core_cxx11_la_SOURCES = \
41
59
impl.cc \
42
60
span.cc \
43
61
tracer.cc \
44
- util.cc \
62
+ util.cc
63
+
64
+ nodist_liblightstep_core_cxx11_la_SOURCES = \
45
65
proto/collector.pb.cc \
46
66
proto/envoy_carrier.pb.cc
47
67
@@ -53,7 +73,9 @@ if ENABLE_GRPC
53
73
lib_LTLIBRARIES += liblightstep_grpc_cxx11.la
54
74
55
75
liblightstep_grpc_cxx11_la_SOURCES = \
56
- recorder.cc \
76
+ recorder.cc
77
+
78
+ nodist_liblightstep_grpc_cxx11_la_SOURCES = \
57
79
proto/collector.grpc.pb.cc
58
80
59
81
# Note $(grpc_LIBS)++ shenanigans. The grpc C++ pkg-config input (grpc++.pc) uses
0 commit comments