From: Florian Forster Date: Thu, 7 Dec 2023 15:00:16 +0000 (+0100) Subject: Makefile.am: Only build OpenTelemetry protos if needed by write_open_telemetry. X-Git-Tag: 6.0.0-rc0~17^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46fcc1565be1f39b5abc31fd18973e06146793aa;p=thirdparty%2Fcollectd.git Makefile.am: Only build OpenTelemetry protos if needed by write_open_telemetry. The plugin is only activated when protoc supports optional fields, which is required by the OT protos. --- diff --git a/Makefile.am b/Makefile.am index f959136ec..88cf6112b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2484,7 +2484,10 @@ collectd.pb.cc: $(srcdir)/proto/collectd.proto $(srcdir)/proto/types.proto types.pb.cc: $(srcdir)/proto/types.proto $(V_PROTOC)$(PROTOC) $(PROTOC_FLAGS) -I$(srcdir)/proto --cpp_out=$(builddir) \ $(srcdir)/proto/types.proto +endif +endif +if BUILD_PLUGIN_WRITE_OPEN_TELEMETRY BUILT_SOURCES += \ opentelemetry/proto/collector/metrics/v1/metrics_service.grpc.pb.cc \ opentelemetry/proto/collector/metrics/v1/metrics_service.pb.cc \ @@ -2507,8 +2510,6 @@ opentelemetry/proto/metrics/v1/metrics.pb.cc: $(srcdir)/opentelemetry-proto/open opentelemetry/proto/resource/v1/resource.pb.cc: $(srcdir)/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto $(V_PROTOC)$(PROTOC) $(PROTOC_FLAGS) -I$(srcdir)/opentelemetry-proto --cpp_out=$(builddir) $< - -endif endif install-exec-hook: