summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-04-26 08:01:31 +0200
committerDave Barach <openvpp@barachs.net>2016-04-28 16:23:35 +0000
commit60c63c7b537260c88225848bd42f0c34a618671d (patch)
tree2e0dfc006395ffba8468abcdd3f25fc831fb01fd /Makefile
parente0ef46b7c0d7a1d1b0078450d73470b6e6a812bf (diff)
VPP-8: Set java-8 for JNI
Change-Id: Ia81713a72e3c48b1d97bbf3f20a908bbc4ebd3b1 Signed-off-by: Maros Marsalek <mmarsale@cisco.com> Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index caf93dda..3aeea8fe 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ MINIMAL_STARTUP_CONF="unix { interactive }"
GDB_ARGS= -ex "handle SIGUSR1 noprint nostop"
DEB_DEPENDS = curl build-essential autoconf automake bison libssl-dev ccache
-DEB_DEPENDS += debhelper dkms default-jdk git libtool libganglia1-dev libapr1-dev dh-systemd
+DEB_DEPENDS += debhelper dkms openjdk-8-jdk git libtool libganglia1-dev libapr1-dev dh-systemd
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope
RPM_DEPENDS_GROUPS = 'Development Tools'
@@ -77,8 +77,19 @@ help:
@echo " PLATFORM = $(PLATFORM)"
@echo " DPDK_VERSION = $(DPDK_VERSION)"
+# openjdk-8-jdk is not available in 14.04 repos by default
+define use_ppa_for_jdk8
+if [ "$(shell lsb_release -r | awk '{print $$2}')"=="14.04" ]; then \
+ sudo apt install software-properties-common; \
+ sudo add-apt-repository -y ppa:openjdk-r/ppa; \
+ sudo apt update; \
+fi;
+endef
+
$(BR)/.bootstrap.ok:
ifeq ("$(shell lsb_release -si)", "Ubuntu")
+ $(use_ppa_for_jdk8)
+
@MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \
if [ -n "$$MISSING" ] ; then \
echo "\nPlease install missing packages: \n$$MISSING\n" ; \
@@ -108,6 +119,7 @@ bootstrap: $(BR)/.bootstrap.ok
install-dep:
ifeq ("$(shell lsb_release -si)", "Ubuntu")
+ $(use_ppa_for_jdk8)
@sudo apt-get -y install $(DEB_DEPENDS)
else ifneq ("$(wildcard /etc/redhat-release)","")
@sudo yum groupinstall -y $(RPM_DEPENDS_GROUPS)
@@ -188,3 +200,4 @@ ctags: ctags.files
cscope: cscope.files
@cscope -b -q -v
+