aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2016-12-12 15:02:59 +0000
committerOle Trøan <otroan@employees.org>2016-12-13 12:32:14 +0000
commitb1e7ead54babc5db656b5200684b743520d6b51f (patch)
treefc01f0990440daea25a53124a87c216d5278a59e
parentdeb698447172d8cae94df9871bb32a9d21705dbb (diff)
ACL: Install ACL JSON in install directory.
Change-Id: I3f7dbd23114acf37322f97da80be746616a9d95d Signed-off-by: Ole Troan <ot@cisco.com>
-rw-r--r--plugins/acl-plugin/Makefile.am23
1 files changed, 12 insertions, 11 deletions
diff --git a/plugins/acl-plugin/Makefile.am b/plugins/acl-plugin/Makefile.am
index bab1ccb59f2..83852d0e6cc 100644
--- a/plugins/acl-plugin/Makefile.am
+++ b/plugins/acl-plugin/Makefile.am
@@ -31,20 +31,26 @@ acl_plugin_la_SOURCES = \
acl/l2sess.h \
acl/acl_plugin.api.h
-BUILT_SOURCES = acl/acl.api.h
+BUILT_SOURCES = acl/acl.api.h acl/acl.api.json
-SUFFIXES = .api.h .api
+SUFFIXES = .api.h .api .api.json
#
# ACL API
#
%.api.h: %.api
- mkdir -p $(dir $@) ; \
+ mkdir -p `dirname $@` ; \
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
| vppapigen --input - --output $@ --show-name $@
+%.api.json: %.api
+ @echo " JSON APIGEN " $@ ; \
+ mkdir -p `dirname $@` ; \
+ $(CC) $(CPPFLAGS) -E -P -C -x c $^ \
+ | vppapigen --input - --json $@
+
apidir = $(prefix)/acl
-api_DATA = acl/acl.api
+api_DATA = acl/acl.api.json
noinst_HEADERS = \
acl/acl_all_api_h.h \
@@ -68,7 +74,6 @@ jvpp_package_dir = io/fd/vpp/jvpp/acl
jvpp_root = acl/jvpp
jvpp_target_dir = target
jvpp_target = $(jvpp_root)/$(jvpp_target_dir)
-api_file=$(srcdir)/acl/acl.api
lib_LTLIBRARIES = libjvpp_acl.la
libjvpp_acl_la_SOURCES = acl/acl.api.h acl/jvpp_acl.c acl/jvpp/io_fd_vpp_jvpp_acl_JVppAclImpl.h
@@ -79,13 +84,13 @@ libjvpp_acl_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I
BUILT_SOURCES += $(jvpp_root)/io_fd_vpp_jvpp_acl_JVppAclImpl.h
-$(jvpp_root)/io_fd_vpp_jvpp_acl_JVppAclImpl.h: acl.api.json
+$(jvpp_root)/io_fd_vpp_jvpp_acl_JVppAclImpl.h: acl/acl.api.json
dir=`pwd`; \
mkdir -p $(jvpp_target); \
mkdir -p $(jvpp_root)/$(jvpp_package_dir); \
cd $(jvpp_root)/$(jvpp_package_dir); \
mkdir -p types dto future callfacade callback notification test; \
- @srcdir@/$(jvpp_registry_root)/jvpp/gen/jvpp_gen.py -i $${dir}/acl.api.json --plugin_name acl; \
+ @srcdir@/$(jvpp_registry_root)/jvpp/gen/jvpp_gen.py -i $${dir}/acl/acl.api.json --plugin_name acl; \
cd -; \
mv -f $(jvpp_root)/$(jvpp_package_dir)/jvpp_acl_gen.h $(jvpp_root)/jvpp_acl_gen.h; \
cp $(srcdir)/$(jvpp_root)/$(jvpp_package_dir)/test/*.java $(jvpp_root)/$(jvpp_package_dir)/test/; \
@@ -106,8 +111,4 @@ $(jacl_jarfile): libjvpp_acl.la
cd $(jvpp_target); \
$(JAR) cfv $(JARFLAGS) ../../../$@ libjvpp_acl.so.0.0.0 $(jvpp_package_dir)/* ; cd ..;
-acl.api.json:
- @echo " jAcl_sfc API"; \
- vppapigen --input $(api_file) --json acl.api.json;
-
all-local: $(jacl_jarfile)