]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Makefile.am: Only build OpenTelemetry protos if needed by write_open_telemetry.
authorFlorian Forster <octo@collectd.org>
Thu, 7 Dec 2023 15:00:16 +0000 (16:00 +0100)
committerFlorian Forster <octo@collectd.org>
Wed, 3 Jan 2024 16:16:28 +0000 (17:16 +0100)
The plugin is only activated when protoc supports optional fields, which
is required by the OT protos.

Makefile.am

index f959136ec8b141f6e81db8ac589c0773d749eb58..88cf6112bf395d0b0b1c2b11a5efa1898a6b77a4 100644 (file)
@@ -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: