From f14e3bf7b297f3b9eea87af412929bb8f277b315 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Thu, 1 Dec 2016 21:49:03 +0100 Subject: API: Packaging of JSON files. Change-Id: If041b6faf1a091d4758b514f0a8cd800ee0e6a89 Signed-off-by: Ole Troan Signed-off-by: Ole Troan Signed-off-by: Ole Troan --- plugins/ioam-plugin/Makefile.am | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'plugins/ioam-plugin/Makefile.am') diff --git a/plugins/ioam-plugin/Makefile.am b/plugins/ioam-plugin/Makefile.am index c66c6cd5e7a..a9ed4ab46fa 100644 --- a/plugins/ioam-plugin/Makefile.am +++ b/plugins/ioam-plugin/Makefile.am @@ -28,7 +28,8 @@ ioam_pot_plugin_la_SOURCES = \ ioam/lib-pot/pot_api.c BUILT_SOURCES = \ - ioam/lib-pot/pot.api.h ioam/lib-pot/pot.py + ioam/lib-pot/pot.api.h \ + ioam/lib-pot/pot.api.json SUFFIXES = .api.h .api @@ -37,14 +38,17 @@ SUFFIXES = .api.h .api $(CC) $(CPPFLAGS) -E -P -C -x c $^ \ | vppapigen --input - --output $@ --show-name $@ -%.py: %.api - $(info Creating Python binding for $@) - $(CC) $(CPPFLAGS) -E -P -C -x c $< \ - | vppapigen --input - --python - \ - | pyvppapigen.py --input - > $@ +%.api.json: %.api + @echo " JSON APIGEN " $@ ; \ + mkdir -p `dirname $@` ; \ + $(CC) $(CPPFLAGS) -E -P -C -x c $^ \ + | vppapigen --input - --json $@ -pyapidir = ${prefix}/vpp_papi_plugins -pyapi_DATA = ioam/lib-pot/pot.py +apidir = $(prefix)/ioam/ +api_DATA = \ + ioam/lib-pot/pot.api.json \ + ioam/lib-trace/trace.api.json \ + ioam/export/ioam_export.api.json noinst_HEADERS = \ ioam/lib-pot/pot_all_api_h.h \ @@ -73,7 +77,9 @@ ioam/export/node.c \ ioam/export/ioam_export.api.h \ ioam/export/ioam_export_thread.c -BUILT_SOURCES += ioam/export/ioam_export.api.h +BUILT_SOURCES += \ + ioam/export/ioam_export.api.h \ + ioam/export/ioam_export.api.json noinst_HEADERS += \ ioam/export/ioam_export_all_api_h.h \ @@ -96,10 +102,9 @@ ioam_trace_plugin_la_SOURCES = \ ioam/lib-trace/trace_util.h \ ioam/lib-trace/trace_api.c -BUILT_SOURCES += \ - ioam/lib-trace/trace.api.h ioam/lib-trace/trace.py - -pyapi_DATA += ioam/lib-trace/trace.py +BUILT_SOURCES += \ + ioam/lib-trace/trace.api.h \ + ioam/lib-trace/trace.api.json noinst_HEADERS += \ ioam/export/ioam_export_all_api_h.h \ -- cgit 1.2.3-korg