jvpp: compile static Java files and include in generated jars
Most Java bindings for VPP APIs provide some tests/examples.
The patch includes them in the compilation process.
Change-Id: Icef3d061c1afd727e8544a7fe5c0204453b1c1d0
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
diff --git a/src/vpp-api/java/Makefile.am b/src/vpp-api/java/Makefile.am
index 2bb7f66..bfb5665 100644
--- a/src/vpp-api/java/Makefile.am
+++ b/src/vpp-api/java/Makefile.am
@@ -72,9 +72,10 @@
@rm -rf jvpp-$(1)/target
@ @srcdir@/jvpp/gen/jvpp_gen.py --plugin_name $(1) --root_dir jvpp-$(1) \
-i $(jvpp_$(1)_json_files) > /dev/null
- @find jvpp-$(1)/target -name \*.java > jvpp-$(1).files
+ @find jvpp-$(1)/target -name \*.java > jvpp-$(1).generated.files
+ @find @srcdir@/jvpp-$(1) -name \*.java > jvpp-$(1).static.files
@$(JAVAC) -classpath jvpp-registry/target \
- -d jvpp-$(1)/target @jvpp-$(1).files
+ -d jvpp-$(1)/target @jvpp-$(1).generated.files @jvpp-$(1).static.files
@$(JAVAH) -force \
-classpath jvpp-registry/target:jvpp-$(1)/target \
-d jvpp-$(1) io.fd.vpp.jvpp.$(1).$(2)
@@ -188,7 +189,6 @@
@echo " JAR $@"
@cp .libs/libjvpp_$*.so jvpp-$*/target
@$(JAR) cf $(JARFLAGS) $@ -C jvpp-$*/target .
- @$(JAR) uf $(JARFLAGS) $@ -C $(srcdir)/jvpp-$* io
jardir = $(prefix)/share/java
jar_DATA = $(JAR_FILES)