Skip to contentSkip to conversation

metrics: fix installation of metrics header

PATCH Applied Ciara Power 2 participants 3 messages Jul 14, 2020 – Jul 17, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 metrics: fix installation of metrics header

If Jansson was found, the headers list is overwritten when including rte_metrics_telemetry.h, which prevents rte_metrics.h from being installed. This is now fixed to add to headers, rather than overwrite, to allow both headers be installed when Jansson is present.

Fixes c5b7197f662e ("telemetry: move some functions to metrics library")
---
 lib/librte_metrics/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_metrics/meson.build +1 -1
index 27ccbd655..eed27b880 100644
@@ -8,7 +8,7 @@ jansson = dependency('jansson', required: false)
 if jansson.found()
 	ext_deps += jansson
 	sources += files('rte_metrics_telemetry.c')
-	headers = files('rte_metrics_telemetry.h')
+	headers += files('rte_metrics_telemetry.h')
 	deps += ['ethdev', 'telemetry']
 	includes += include_directories('../librte_telemetry')
 endif
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 19 lines · Ciara Power

If Jansson was found, the headers list is overwritten when including rte_metrics_telemetry.h, which prevents rte_metrics.h from being installed. This is now fixed to add to headers, rather than overwrite, to allow both headers be installed when Jansson is present.

Fixes c5b7197f662e ("telemetry: move some functions to metrics library")
---
 lib/librte_metrics/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_metrics/meson.build +0 -0
index 27ccbd655..eed27b880 100644

lib/librte_metrics/meson.build jansson = dependency('jansson', required: false) · line 14

Quoted 8 lines
lib/librte_metrics/meson.build +1 -1
@@ -8,7 +8,7 @@ jansson = dependency('jansson', required: false)
 if jansson.found()
        ext_deps += jansson
        sources += files('rte_metrics_telemetry.c')
-       headers = files('rte_metrics_telemetry.h')
+       headers += files('rte_metrics_telemetry.h')
        deps += ['ethdev', 'telemetry']
        includes += include_directories('../librte_telemetry')
 endif

Reproduced the issue.
The fix lgtm.

Signature · 1 line
David Marchand
#2 lore raw
Quoted 7 lines · David Marchand
Quoted 6 lines · Ciara Power

If Jansson was found, the headers list is overwritten when including rte_metrics_telemetry.h, which prevents rte_metrics.h from being installed. This is now fixed to add to headers, rather than overwrite, to allow both headers be installed when Jansson is present.

Quoted 5 lines
Quoted 4 lines
Fixes c5b7197f662e ("telemetry: move some functions to metrics library")

Applied, thanks.

Signature · 1 line
David Marchand