2016-02-10 00:36:06 +01:00
|
|
|
# Copyright (c) 2016 Cisco and/or its affiliates.
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at:
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2017-01-15 21:30:50 +01:00
|
|
|
export WS_ROOT=$(CURDIR)
|
|
|
|
export BR=$(WS_ROOT)/build-root
|
2016-02-10 00:36:06 +01:00
|
|
|
CCACHE_DIR?=$(BR)/.ccache
|
|
|
|
GDB?=gdb
|
2016-03-16 22:49:05 +01:00
|
|
|
PLATFORM?=vpp
|
2017-05-31 19:25:08 +02:00
|
|
|
SAMPLE_PLUGIN?=no
|
2018-07-19 14:39:40 +02:00
|
|
|
STARTUP_DIR?=$(PWD)
|
2017-09-22 12:26:34 -05:00
|
|
|
MACHINE=$(shell uname -m)
|
2018-04-05 21:32:29 +02:00
|
|
|
SUDO?=sudo
|
2019-09-24 17:45:49 +02:00
|
|
|
DPDK_CONFIG?=no-pci
|
2017-09-22 12:26:34 -05:00
|
|
|
|
2017-06-30 11:51:41 +02:00
|
|
|
,:=,
|
|
|
|
define disable_plugins
|
|
|
|
$(if $(1), \
|
|
|
|
"plugins {" \
|
|
|
|
$(patsubst %,"plugin %_plugin.so { disable }",$(subst $(,), ,$(1))) \
|
|
|
|
" }" \
|
|
|
|
,)
|
|
|
|
endef
|
|
|
|
|
|
|
|
MINIMAL_STARTUP_CONF=" \
|
|
|
|
unix { \
|
|
|
|
interactive \
|
|
|
|
cli-listen /run/vpp/cli.sock \
|
|
|
|
gid $(shell id -g) \
|
|
|
|
$(if $(wildcard startup.vpp),"exec startup.vpp",) \
|
|
|
|
} \
|
|
|
|
$(if $(DPDK_CONFIG), "dpdk { $(DPDK_CONFIG) }",) \
|
|
|
|
$(call disable_plugins,$(DISABLED_PLUGINS)) \
|
|
|
|
"
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2016-02-23 22:04:50 +01:00
|
|
|
GDB_ARGS= -ex "handle SIGUSR1 noprint nostop"
|
|
|
|
|
2016-05-02 19:40:27 +02:00
|
|
|
#
|
|
|
|
# OS Detection
|
|
|
|
#
|
2016-09-22 20:52:26 -04:00
|
|
|
# We allow Darwin (MacOS) for docs generation; VPP build will still fail.
|
|
|
|
ifneq ($(shell uname),Darwin)
|
2016-05-02 19:40:27 +02:00
|
|
|
OS_ID = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
|
|
|
|
OS_VERSION_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
|
2016-09-22 20:52:26 -04:00
|
|
|
endif
|
2016-05-02 19:40:27 +02:00
|
|
|
|
2017-01-23 12:08:58 +01:00
|
|
|
ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
|
2017-01-09 20:24:50 +01:00
|
|
|
PKG=deb
|
2018-05-17 15:46:13 +02:00
|
|
|
else ifeq ($(filter rhel centos fedora opensuse opensuse-leap opensuse-tumbleweed,$(OS_ID)),$(OS_ID))
|
2017-01-09 20:24:50 +01:00
|
|
|
PKG=rpm
|
|
|
|
endif
|
|
|
|
|
2017-07-03 13:11:38 -04:00
|
|
|
# +libganglia1-dev if building the gmond plugin
|
|
|
|
|
2017-10-12 13:06:35 +02:00
|
|
|
DEB_DEPENDS = curl build-essential autoconf automake ccache
|
2017-07-03 13:11:38 -04:00
|
|
|
DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-systemd
|
2017-01-10 10:39:21 +01:00
|
|
|
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
|
2017-10-27 08:58:38 +01:00
|
|
|
DEB_DEPENDS += lcov chrpath autoconf indent clang-format libnuma-dev
|
2019-03-13 18:08:42 +01:00
|
|
|
DEB_DEPENDS += python-all python3-all python3-setuptools python-dev
|
|
|
|
DEB_DEPENDS += python-virtualenv python-pip libffi6 check
|
2019-02-01 19:37:45 -08:00
|
|
|
DEB_DEPENDS += libboost-all-dev libffi-dev python3-ply libmbedtls-dev
|
2019-11-03 18:44:31 -05:00
|
|
|
DEB_DEPENDS += cmake ninja-build uuid-dev python3-jsonschema python3-yaml yamllint
|
2019-11-20 19:15:46 -05:00
|
|
|
DEB_DEPENDS += python3-venv # ensurepip
|
2016-05-05 18:03:27 -05:00
|
|
|
ifeq ($(OS_VERSION_ID),14.04)
|
2017-09-21 13:15:53 +01:00
|
|
|
DEB_DEPENDS += libssl-dev
|
2017-05-29 12:29:05 +02:00
|
|
|
else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
|
2017-09-21 13:15:53 +01:00
|
|
|
DEB_DEPENDS += libssl-dev
|
2017-05-29 12:29:05 +02:00
|
|
|
APT_ARGS = -t jessie-backports
|
2017-09-21 13:15:53 +01:00
|
|
|
else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-9)
|
|
|
|
DEB_DEPENDS += libssl1.0-dev
|
2018-07-19 14:39:40 +02:00
|
|
|
else
|
2017-09-21 13:15:53 +01:00
|
|
|
DEB_DEPENDS += libssl-dev
|
2016-05-05 18:03:27 -05:00
|
|
|
endif
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-01-31 10:57:40 +01:00
|
|
|
RPM_DEPENDS = redhat-lsb glibc-static
|
2017-09-06 10:44:07 +02:00
|
|
|
RPM_DEPENDS += apr-devel
|
2017-08-03 11:04:24 -04:00
|
|
|
RPM_DEPENDS += numactl-devel
|
2017-10-09 15:03:55 -04:00
|
|
|
RPM_DEPENDS += check check-devel
|
2017-10-16 04:20:13 -07:00
|
|
|
RPM_DEPENDS += boost boost-devel
|
2018-01-15 17:54:52 -05:00
|
|
|
RPM_DEPENDS += selinux-policy selinux-policy-devel
|
2018-11-27 15:57:30 -05:00
|
|
|
RPM_DEPENDS += ninja-build
|
2018-10-15 12:52:30 -07:00
|
|
|
RPM_DEPENDS += libuuid-devel
|
2019-02-26 09:19:24 -05:00
|
|
|
RPM_DEPENDS += mbedtls-devel
|
2019-11-03 18:44:31 -05:00
|
|
|
RPM_DEPENDS += yamllint
|
2017-09-29 12:36:37 +02:00
|
|
|
|
2018-11-27 15:57:30 -05:00
|
|
|
ifeq ($(OS_ID),fedora)
|
|
|
|
RPM_DEPENDS += dnf-utils
|
2018-03-05 17:21:56 -05:00
|
|
|
RPM_DEPENDS += subunit subunit-devel
|
2017-09-11 08:58:23 -04:00
|
|
|
RPM_DEPENDS += compat-openssl10-devel
|
2019-04-05 19:04:22 +02:00
|
|
|
RPM_DEPENDS += python3-devel python3-ply
|
2019-05-14 13:24:10 +02:00
|
|
|
RPM_DEPENDS += python3-virtualenv python3-jsonschema
|
2018-11-27 15:57:30 -05:00
|
|
|
RPM_DEPENDS += cmake
|
2017-05-17 19:00:07 -04:00
|
|
|
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
|
2017-03-29 10:40:16 -04:00
|
|
|
else
|
2018-11-27 15:57:30 -05:00
|
|
|
RPM_DEPENDS += yum-utils
|
2017-09-11 08:58:23 -04:00
|
|
|
RPM_DEPENDS += openssl-devel
|
2019-04-05 06:45:56 -07:00
|
|
|
RPM_DEPENDS += python-devel python36-ply
|
2019-09-17 13:19:42 -06:00
|
|
|
RPM_DEPENDS += python3-devel python3-pip
|
2019-05-14 13:24:10 +02:00
|
|
|
RPM_DEPENDS += python-virtualenv python36-jsonschema
|
2018-08-24 13:37:45 +02:00
|
|
|
RPM_DEPENDS += devtoolset-7
|
2018-11-27 15:57:30 -05:00
|
|
|
RPM_DEPENDS += cmake3
|
2017-05-17 19:00:07 -04:00
|
|
|
RPM_DEPENDS_GROUPS = 'Development Tools'
|
2017-03-29 10:40:16 -04:00
|
|
|
endif
|
2017-07-03 13:11:38 -04:00
|
|
|
|
|
|
|
# +ganglia-devel if building the ganglia plugin
|
|
|
|
|
2017-05-17 19:00:07 -04:00
|
|
|
RPM_DEPENDS += chrpath libffi-devel rpm-build
|
2019-02-27 11:15:04 -08:00
|
|
|
# lowercase- replace spaces with dashes.
|
|
|
|
SUSE_NAME= $(shell grep '^NAME=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | sed -e 's/ /-/' | awk '{print tolower($$0)}')
|
2018-04-06 14:52:54 -06:00
|
|
|
SUSE_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2)
|
2017-10-12 13:06:35 +02:00
|
|
|
RPM_SUSE_BUILDTOOLS_DEPS = autoconf automake ccache check-devel chrpath
|
2019-02-01 19:37:45 -08:00
|
|
|
RPM_SUSE_BUILDTOOLS_DEPS += clang cmake indent libtool make ninja python3-ply
|
2017-12-12 11:06:17 +01:00
|
|
|
|
2019-01-31 10:57:40 +01:00
|
|
|
RPM_SUSE_DEVEL_DEPS = glibc-devel-static libnuma-devel
|
2018-10-15 12:52:30 -07:00
|
|
|
RPM_SUSE_DEVEL_DEPS += libopenssl-devel openssl-devel mbedtls-devel libuuid-devel
|
2017-12-12 11:06:17 +01:00
|
|
|
|
|
|
|
RPM_SUSE_PYTHON_DEPS = python-devel python3-devel python-pip python3-pip
|
|
|
|
RPM_SUSE_PYTHON_DEPS += python-rpm-macros python3-rpm-macros
|
|
|
|
|
2017-10-24 17:02:04 +02:00
|
|
|
RPM_SUSE_PLATFORM_DEPS = distribution-release shadow rpm-build
|
2017-10-10 16:43:14 +02:00
|
|
|
|
|
|
|
ifeq ($(OS_ID),opensuse)
|
2019-02-27 11:15:04 -08:00
|
|
|
ifeq ($(SUSE_NAME),tumbleweed)
|
2018-12-27 09:07:32 -08:00
|
|
|
RPM_SUSE_DEVEL_DEPS = libboost_headers1_68_0-devel-1.68.0 libboost_thread1_68_0-devel-1.68.0 gcc
|
2019-02-01 19:37:45 -08:00
|
|
|
RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
|
2017-10-10 16:43:14 +02:00
|
|
|
endif
|
2018-04-06 14:52:54 -06:00
|
|
|
ifeq ($(SUSE_ID),15.0)
|
2019-02-19 10:27:23 -07:00
|
|
|
RPM_SUSE_DEVEL_DEPS += libboost_headers-devel libboost_thread-devel gcc
|
2019-02-01 19:37:45 -08:00
|
|
|
RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
|
2018-04-06 14:52:54 -06:00
|
|
|
else
|
2018-12-27 09:07:32 -08:00
|
|
|
RPM_SUSE_DEVEL_DEPS += libboost_headers1_68_0-devel-1.68.0 gcc6
|
2018-04-06 14:52:54 -06:00
|
|
|
RPM_SUSE_PYTHON_DEPS += python-virtualenv
|
|
|
|
endif
|
2017-10-10 16:43:14 +02:00
|
|
|
endif
|
2017-06-01 15:20:15 +02:00
|
|
|
|
2018-04-26 17:13:17 -06:00
|
|
|
ifeq ($(OS_ID),opensuse-leap)
|
|
|
|
ifeq ($(SUSE_ID),15.0)
|
2019-03-26 10:27:57 +01:00
|
|
|
RPM_SUSE_DEVEL_DEPS += libboost_headers-devel libboost_thread-devel gcc git curl
|
2019-02-01 19:37:45 -08:00
|
|
|
RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
|
2018-04-26 17:13:17 -06:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-10-24 17:02:04 +02:00
|
|
|
RPM_SUSE_DEPENDS += $(RPM_SUSE_BUILDTOOLS_DEPS) $(RPM_SUSE_DEVEL_DEPS) $(RPM_SUSE_PYTHON_DEPS) $(RPM_SUSE_PLATFORM_DEPS)
|
|
|
|
|
2016-03-29 22:37:02 +02:00
|
|
|
ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
|
2016-02-23 22:04:50 +01:00
|
|
|
STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf
|
|
|
|
endif
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2016-05-02 19:40:27 +02:00
|
|
|
ifeq ($(findstring y,$(UNATTENDED)),y)
|
|
|
|
CONFIRM=-y
|
2016-06-17 12:54:17 -07:00
|
|
|
FORCE=--force-yes
|
2016-05-02 19:40:27 +02:00
|
|
|
endif
|
|
|
|
|
2017-05-31 19:25:08 +02:00
|
|
|
TARGETS = vpp
|
|
|
|
|
|
|
|
ifneq ($(SAMPLE_PLUGIN),no)
|
|
|
|
TARGETS += sample-plugin
|
|
|
|
endif
|
|
|
|
|
2018-09-18 18:41:38 +02:00
|
|
|
define banner
|
|
|
|
@echo "========================================================================"
|
|
|
|
@echo " $(1)"
|
|
|
|
@echo "========================================================================"
|
|
|
|
@echo " "
|
|
|
|
endef
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: help
|
2016-02-10 00:36:06 +01:00
|
|
|
help:
|
|
|
|
@echo "Make Targets:"
|
2019-11-14 12:19:32 -05:00
|
|
|
@echo " install-dep[s] - install software dependencies"
|
2019-09-24 17:52:36 -04:00
|
|
|
@echo " wipe - wipe all products of debug build "
|
|
|
|
@echo " wipe-release - wipe all products of release build "
|
|
|
|
@echo " build - build debug binaries"
|
|
|
|
@echo " build-release - build release binaries"
|
|
|
|
@echo " build-coverity - build coverity artifacts"
|
2019-11-01 02:34:32 -04:00
|
|
|
@echo " rebuild - wipe and build debug binaries"
|
|
|
|
@echo " rebuild-release - wipe and build release binaries"
|
2019-09-24 17:52:36 -04:00
|
|
|
@echo " run - run debug binary"
|
|
|
|
@echo " run-release - run release binary"
|
|
|
|
@echo " debug - run debug binary with debugger"
|
|
|
|
@echo " debug-release - run release binary with debugger"
|
2019-11-15 17:29:15 -05:00
|
|
|
@echo " test - build and run tests"
|
2019-09-24 17:52:36 -04:00
|
|
|
@echo " test-help - show help on test framework"
|
|
|
|
@echo " run-vat - run vpp-api-test tool"
|
|
|
|
@echo " pkg-deb - build DEB packages"
|
|
|
|
@echo " pkg-deb-debug - build DEB debug packages"
|
|
|
|
@echo " vom-pkg-deb - build vom DEB packages"
|
|
|
|
@echo " vom-pkg-deb-debug - build vom DEB debug packages"
|
|
|
|
@echo " pkg-rpm - build RPM packages"
|
2019-11-14 12:19:32 -05:00
|
|
|
@echo " install-ext-dep[s] - install external development dependencies"
|
2019-09-24 17:52:36 -04:00
|
|
|
@echo " ctags - (re)generate ctags database"
|
|
|
|
@echo " gtags - (re)generate gtags database"
|
|
|
|
@echo " cscope - (re)generate cscope database"
|
|
|
|
@echo " checkstyle - check coding style"
|
2019-11-14 12:19:32 -05:00
|
|
|
@echo " checkstyle-commit - check commit message format"
|
|
|
|
@echo " checkstyle-test - check test framework coding style"
|
2019-09-24 17:52:36 -04:00
|
|
|
@echo " fixstyle - fix coding style"
|
|
|
|
@echo " doxygen - (re)generate documentation"
|
|
|
|
@echo " bootstrap-doxygen - setup Doxygen dependencies"
|
|
|
|
@echo " wipe-doxygen - wipe all generated documentation"
|
|
|
|
@echo " checkfeaturelist - check FEATURE.yaml according to schema"
|
|
|
|
@echo " featurelist - dump feature list in markdown"
|
|
|
|
@echo " json-api-files - (re)-generate json api files"
|
2019-07-15 15:22:31 -04:00
|
|
|
@echo " json-api-files-debug - (re)-generate json api files for debug target"
|
2018-09-24 14:59:33 -04:00
|
|
|
@echo " docs - Build the Sphinx documentation"
|
2019-09-24 17:52:36 -04:00
|
|
|
@echo " docs-venv - Build the virtual environment for the Sphinx docs"
|
|
|
|
@echo " docs-clean - Remove the generated files from the Sphinx docs"
|
2016-02-10 00:36:06 +01:00
|
|
|
@echo ""
|
|
|
|
@echo "Make Arguments:"
|
2017-06-30 11:51:41 +02:00
|
|
|
@echo " V=[0|1] - set build verbosity level"
|
|
|
|
@echo " STARTUP_CONF=<path> - startup configuration file"
|
|
|
|
@echo " (e.g. /etc/vpp/startup.conf)"
|
2019-11-01 02:34:32 -04:00
|
|
|
@echo " STARTUP_DIR=<path> - startup directory (e.g. /etc/vpp)"
|
2017-06-30 11:51:41 +02:00
|
|
|
@echo " It also sets STARTUP_CONF if"
|
|
|
|
@echo " startup.conf file is present"
|
|
|
|
@echo " GDB=<path> - gdb binary to use for debugging"
|
|
|
|
@echo " PLATFORM=<name> - target platform. default is vpp"
|
|
|
|
@echo " TEST=<filter> - apply filter to test set, see test-help"
|
|
|
|
@echo " DPDK_CONFIG=<conf> - add specified dpdk config commands to"
|
|
|
|
@echo " autogenerated startup.conf"
|
|
|
|
@echo " (e.g. \"no-pci\" )"
|
|
|
|
@echo " SAMPLE_PLUGIN=yes - in addition build/run/debug sample plugin"
|
|
|
|
@echo " DISABLED_PLUGINS=<list> - comma separated list of plugins which"
|
|
|
|
@echo " should not be loaded"
|
2016-02-10 00:36:06 +01:00
|
|
|
@echo ""
|
2016-10-28 13:20:27 +02:00
|
|
|
@echo "Current Argument Values:"
|
2017-05-31 19:25:08 +02:00
|
|
|
@echo " V = $(V)"
|
|
|
|
@echo " STARTUP_CONF = $(STARTUP_CONF)"
|
|
|
|
@echo " STARTUP_DIR = $(STARTUP_DIR)"
|
|
|
|
@echo " GDB = $(GDB)"
|
|
|
|
@echo " PLATFORM = $(PLATFORM)"
|
|
|
|
@echo " DPDK_VERSION = $(DPDK_VERSION)"
|
2017-06-30 11:51:41 +02:00
|
|
|
@echo " DPDK_CONFIG = $(DPDK_CONFIG)"
|
2017-05-31 19:25:08 +02:00
|
|
|
@echo " SAMPLE_PLUGIN = $(SAMPLE_PLUGIN)"
|
2017-06-30 11:51:41 +02:00
|
|
|
@echo " DISABLED_PLUGINS = $(DISABLED_PLUGINS)"
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2018-03-15 19:36:41 +01:00
|
|
|
$(BR)/.deps.ok:
|
2016-11-19 12:04:34 +01:00
|
|
|
ifeq ($(findstring y,$(UNATTENDED)),y)
|
|
|
|
make install-dep
|
|
|
|
endif
|
2017-05-29 12:29:05 +02:00
|
|
|
ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
|
2016-02-10 00:36:06 +01:00
|
|
|
@MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \
|
|
|
|
if [ -n "$$MISSING" ] ; then \
|
|
|
|
echo "\nPlease install missing packages: \n$$MISSING\n" ; \
|
2016-02-25 16:26:01 +01:00
|
|
|
echo "by executing \"make install-dep\"\n" ; \
|
2016-02-10 00:36:06 +01:00
|
|
|
exit 1 ; \
|
|
|
|
fi ; \
|
|
|
|
exit 0
|
2017-03-20 19:19:51 -04:00
|
|
|
else ifneq ("$(wildcard /etc/redhat-release)","")
|
2017-08-03 11:04:24 -04:00
|
|
|
@for i in $(RPM_DEPENDS) ; do \
|
2017-03-20 19:19:51 -04:00
|
|
|
RPM=$$(basename -s .rpm "$${i##*/}" | cut -d- -f1,2,3) ; \
|
2017-08-03 11:04:24 -04:00
|
|
|
MISSING+=$$(rpm -q $$RPM | grep "^package") ; \
|
2017-03-20 19:19:51 -04:00
|
|
|
done ; \
|
|
|
|
if [ -n "$$MISSING" ] ; then \
|
|
|
|
echo "Please install missing RPMs: \n$$MISSING\n" ; \
|
|
|
|
echo "by executing \"make install-dep\"\n" ; \
|
|
|
|
exit 1 ; \
|
|
|
|
fi ; \
|
|
|
|
exit 0
|
2016-02-10 00:36:06 +01:00
|
|
|
endif
|
|
|
|
@touch $@
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: bootstrap
|
2018-03-15 19:36:41 +01:00
|
|
|
bootstrap:
|
|
|
|
@echo "'make bootstrap' is not needed anymore"
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: install-dep
|
2016-02-25 16:26:01 +01:00
|
|
|
install-dep:
|
2017-05-29 12:29:05 +02:00
|
|
|
ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
|
2016-05-02 19:40:27 +02:00
|
|
|
ifeq ($(OS_VERSION_ID),14.04)
|
2016-06-17 12:54:17 -07:00
|
|
|
@sudo -E apt-get $(CONFIRM) $(FORCE) install software-properties-common
|
2017-05-29 12:29:05 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
|
|
|
|
@grep -q jessie-backports /etc/apt/sources.list /etc/apt/sources.list.d/* 2> /dev/null \
|
|
|
|
|| ( echo "Please install jessie-backports" ; exit 1 )
|
2016-05-02 19:40:27 +02:00
|
|
|
endif
|
2017-02-01 16:08:51 -08:00
|
|
|
@sudo -E apt-get update
|
2017-05-29 12:29:05 +02:00
|
|
|
@sudo -E apt-get $(APT_ARGS) $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
|
2016-03-22 16:09:29 -05:00
|
|
|
else ifneq ("$(wildcard /etc/redhat-release)","")
|
2018-10-30 22:52:15 -07:00
|
|
|
ifeq ($(OS_ID),rhel)
|
|
|
|
@sudo -E yum-config-manager --enable rhel-server-rhscl-7-rpms
|
2019-02-04 22:27:20 -08:00
|
|
|
@sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
|
|
|
|
@sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
|
|
|
|
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
|
2018-10-30 22:52:15 -07:00
|
|
|
else ifeq ($(OS_ID),centos)
|
2019-01-15 08:24:26 +00:00
|
|
|
@sudo -E yum install $(CONFIRM) centos-release-scl-rh epel-release
|
2018-10-30 22:52:15 -07:00
|
|
|
@sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
|
2017-01-02 16:44:21 +01:00
|
|
|
@sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
|
2018-02-21 12:07:41 -08:00
|
|
|
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
|
2018-11-27 15:57:30 -05:00
|
|
|
else ifeq ($(OS_ID),fedora)
|
|
|
|
@sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
|
|
|
|
@sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
|
|
|
|
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
|
|
|
|
endif
|
2018-08-20 12:21:30 +02:00
|
|
|
else ifeq ($(filter opensuse-tumbleweed,$(OS_ID)),$(OS_ID))
|
2017-10-10 09:30:33 +02:00
|
|
|
@sudo -E zypper refresh
|
|
|
|
@sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
|
2018-04-26 17:13:17 -06:00
|
|
|
else ifeq ($(filter opensuse-leap,$(OS_ID)),$(OS_ID))
|
|
|
|
@sudo -E zypper refresh
|
2018-12-27 09:07:32 -08:00
|
|
|
@sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
|
2018-08-20 11:05:03 -06:00
|
|
|
else ifeq ($(filter opensuse,$(OS_ID)),$(OS_ID))
|
|
|
|
@sudo -E zypper refresh
|
|
|
|
@sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
|
2016-02-25 16:26:01 +01:00
|
|
|
else
|
2018-10-30 22:52:15 -07:00
|
|
|
$(error "This option currently works only on Ubuntu, Debian, RHEL, CentOS or openSUSE systems")
|
2016-02-25 16:26:01 +01:00
|
|
|
endif
|
2019-05-07 10:32:40 +02:00
|
|
|
git config commit.template .git_commit_template.txt
|
2016-02-25 16:26:01 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: install-deps
|
|
|
|
install-deps: install-dep
|
|
|
|
|
2016-02-10 00:36:06 +01:00
|
|
|
define make
|
2016-04-26 18:19:47 +02:00
|
|
|
@make -C $(BR) PLATFORM=$(PLATFORM) TAG=$(1) $(2)
|
2016-02-10 00:36:06 +01:00
|
|
|
endef
|
|
|
|
|
2016-10-13 18:36:50 -04:00
|
|
|
$(BR)/scripts/.version:
|
|
|
|
ifneq ("$(wildcard /etc/redhat-release)","")
|
|
|
|
$(shell $(BR)/scripts/version rpm-string > $(BR)/scripts/.version)
|
|
|
|
else
|
|
|
|
$(shell $(BR)/scripts/version > $(BR)/scripts/.version)
|
|
|
|
endif
|
|
|
|
|
2017-04-18 15:26:39 +02:00
|
|
|
DIST_FILE = $(BR)/vpp-$(shell src/scripts/version).tar
|
|
|
|
DIST_SUBDIR = vpp-$(shell src/scripts/version|cut -f1 -d-)
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: dist
|
2017-04-18 15:26:39 +02:00
|
|
|
dist:
|
2017-07-18 15:48:03 -04:00
|
|
|
@if git rev-parse 2> /dev/null ; then \
|
|
|
|
git archive \
|
|
|
|
--prefix=$(DIST_SUBDIR)/ \
|
|
|
|
--format=tar \
|
|
|
|
-o $(DIST_FILE) \
|
|
|
|
HEAD ; \
|
|
|
|
git describe > $(BR)/.version ; \
|
|
|
|
else \
|
|
|
|
(cd .. ; tar -cf $(DIST_FILE) $(DIST_SUBDIR) --exclude=*.tar) ; \
|
|
|
|
src/scripts/version > $(BR)/.version ; \
|
|
|
|
fi
|
2017-04-18 15:26:39 +02:00
|
|
|
@tar --append \
|
|
|
|
--file $(DIST_FILE) \
|
|
|
|
--transform='s,.*/.version,$(DIST_SUBDIR)/src/scripts/.version,' \
|
|
|
|
$(BR)/.version
|
|
|
|
@$(RM) $(BR)/.version $(DIST_FILE).xz
|
|
|
|
@xz -v --threads=0 $(DIST_FILE)
|
|
|
|
@$(RM) $(BR)/vpp-latest.tar.xz
|
|
|
|
@ln -rs $(DIST_FILE).xz $(BR)/vpp-latest.tar.xz
|
2016-10-13 18:36:50 -04:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: build
|
2018-03-15 19:36:41 +01:00
|
|
|
build: $(BR)/.deps.ok
|
2018-03-14 20:58:39 +01:00
|
|
|
$(call make,$(PLATFORM)_debug,$(addsuffix -install,$(TARGETS)))
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: wipedist
|
2016-10-13 18:36:50 -04:00
|
|
|
wipedist:
|
2017-04-18 15:26:39 +02:00
|
|
|
@$(RM) $(BR)/*.tar.xz
|
2016-10-13 18:36:50 -04:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: wipe
|
2018-03-15 19:36:41 +01:00
|
|
|
wipe: wipedist test-wipe $(BR)/.deps.ok
|
2017-05-31 19:25:08 +02:00
|
|
|
$(call make,$(PLATFORM)_debug,$(addsuffix -wipe,$(TARGETS)))
|
2018-12-07 03:57:49 -08:00
|
|
|
@find . -type f -name "*.api.json" ! -path "./test/*" -exec rm {} \;
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: rebuild
|
2016-02-10 00:36:06 +01:00
|
|
|
rebuild: wipe build
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: build-release
|
2018-03-15 19:36:41 +01:00
|
|
|
build-release: $(BR)/.deps.ok
|
2017-05-31 19:25:08 +02:00
|
|
|
$(call make,$(PLATFORM),$(addsuffix -install,$(TARGETS)))
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: wipe-release
|
2018-03-15 19:36:41 +01:00
|
|
|
wipe-release: test-wipe $(BR)/.deps.ok
|
2017-05-31 19:25:08 +02:00
|
|
|
$(call make,$(PLATFORM),$(addsuffix -wipe,$(TARGETS)))
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: rebuild-release
|
2016-02-10 00:36:06 +01:00
|
|
|
rebuild-release: wipe-release build-release
|
|
|
|
|
2017-05-09 23:27:14 -07:00
|
|
|
libexpand = $(subst $(subst ,, ),:,$(foreach lib,$(1),$(BR)/install-$(2)-native/vpp/$(lib)/$(3)))
|
|
|
|
|
2018-11-08 11:21:39 +01:00
|
|
|
export TEST_DIR ?= $(WS_ROOT)/test
|
|
|
|
|
2016-10-03 19:44:57 +02:00
|
|
|
define test
|
2018-07-16 08:22:37 -04:00
|
|
|
$(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-install,)
|
2017-05-09 23:27:14 -07:00
|
|
|
$(eval libs:=lib lib64)
|
2016-10-11 11:47:09 +02:00
|
|
|
make -C test \
|
2018-11-08 11:21:39 +01:00
|
|
|
VPP_BUILD_DIR=$(BR)/build-$(2)-native \
|
|
|
|
VPP_BIN=$(BR)/install-$(2)-native/vpp/bin/vpp \
|
|
|
|
VPP_PLUGIN_PATH=$(call libexpand,$(libs),$(2),vpp_plugins) \
|
2019-05-08 19:18:18 -04:00
|
|
|
VPP_TEST_PLUGIN_PATH=$(call libexpand,$(libs),$(2),vpp_api_test_plugins) \
|
2018-11-08 11:21:39 +01:00
|
|
|
VPP_INSTALL_PATH=$(BR)/install-$(2)-native/ \
|
2017-05-09 23:27:14 -07:00
|
|
|
LD_LIBRARY_PATH=$(call libexpand,$(libs),$(2),) \
|
2017-03-07 11:39:27 +01:00
|
|
|
EXTENDED_TESTS=$(EXTENDED_TESTS) \
|
2017-04-07 01:48:47 +00:00
|
|
|
PYTHON=$(PYTHON) \
|
2017-09-29 12:36:37 +02:00
|
|
|
OS_ID=$(OS_ID) \
|
2017-11-06 09:46:00 +01:00
|
|
|
CACHE_OUTPUT=$(CACHE_OUTPUT) \
|
2017-01-15 21:30:50 +01:00
|
|
|
$(3)
|
2016-10-03 19:44:57 +02:00
|
|
|
endef
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test
|
2018-03-15 19:36:41 +01:00
|
|
|
test:
|
2017-03-09 20:38:15 +01:00
|
|
|
$(call test,vpp,vpp,test)
|
2016-10-03 19:44:57 +02:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-debug
|
2018-03-15 19:36:41 +01:00
|
|
|
test-debug:
|
2017-03-09 20:38:15 +01:00
|
|
|
$(call test,vpp,vpp_debug,test)
|
2016-10-11 11:47:09 +02:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-gcov
|
2019-03-22 08:50:29 -04:00
|
|
|
test-gcov:
|
|
|
|
$(call test,vpp,vpp_gcov,test)
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-all
|
2018-03-15 19:36:41 +01:00
|
|
|
test-all:
|
2019-01-31 10:57:40 +01:00
|
|
|
$(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=vpp TAG=vpp vom-install,)
|
2018-07-16 08:22:37 -04:00
|
|
|
$(eval EXTENDED_TESTS=yes)
|
2018-11-15 14:27:04 +01:00
|
|
|
$(call test,vpp,vpp,test)
|
2018-07-16 08:22:37 -04:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-all-debug
|
2018-03-15 19:36:41 +01:00
|
|
|
test-all-debug:
|
2019-01-31 10:57:40 +01:00
|
|
|
$(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=vpp TAG=vpp_debug vom-install,)
|
2017-03-07 11:39:27 +01:00
|
|
|
$(eval EXTENDED_TESTS=yes)
|
2017-03-09 20:38:15 +01:00
|
|
|
$(call test,vpp,vpp_debug,test)
|
2017-03-07 11:39:27 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: papi-wipe
|
|
|
|
papi-wipe: test-wipe-papi
|
|
|
|
$(call banner,"This command is deprecated. Please use 'test-wipe-papi'")
|
|
|
|
|
|
|
|
.PHONY: test-wipe-papi
|
|
|
|
test-wipe-papi:
|
2019-07-09 16:49:46 -04:00
|
|
|
@make -C test papi-wipe
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-help
|
2016-10-28 13:20:27 +02:00
|
|
|
test-help:
|
|
|
|
@make -C test help
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-wipe
|
2016-10-28 13:20:27 +02:00
|
|
|
test-wipe:
|
|
|
|
@make -C test wipe
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-shell
|
2018-03-15 19:36:41 +01:00
|
|
|
test-shell:
|
2017-03-16 09:14:59 +01:00
|
|
|
$(call test,vpp,vpp,shell)
|
2017-03-09 08:01:52 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-shell-debug
|
2018-03-15 19:36:41 +01:00
|
|
|
test-shell-debug:
|
2017-03-16 09:14:59 +01:00
|
|
|
$(call test,vpp,vpp_debug,shell)
|
2017-03-09 08:01:52 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-shell-gcov
|
2019-05-08 19:18:18 -04:00
|
|
|
test-shell-gcov:
|
|
|
|
$(call test,vpp,vpp_gcov,shell)
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-dep
|
2018-04-02 16:42:48 -06:00
|
|
|
test-dep:
|
|
|
|
@make -C test test-dep
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-doc
|
2016-10-11 11:47:09 +02:00
|
|
|
test-doc:
|
2017-01-15 21:30:50 +01:00
|
|
|
@make -C test doc
|
2016-10-11 11:47:09 +02:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-wipe-doc
|
2016-10-28 13:20:27 +02:00
|
|
|
test-wipe-doc:
|
2017-01-15 21:30:50 +01:00
|
|
|
@make -C test wipe-doc
|
2016-10-03 19:44:57 +02:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-cov
|
2018-03-15 19:36:41 +01:00
|
|
|
test-cov:
|
2019-06-27 08:13:35 +00:00
|
|
|
@make -C $(BR) PLATFORM=vpp TAG=vpp_gcov vom-install
|
2017-03-21 08:27:18 +01:00
|
|
|
$(eval EXTENDED_TESTS=yes)
|
2017-03-09 20:38:15 +01:00
|
|
|
$(call test,vpp,vpp_gcov,cov)
|
2016-11-16 19:50:24 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-wipe-cov
|
2016-11-16 19:50:24 +01:00
|
|
|
test-wipe-cov:
|
2017-01-15 21:30:50 +01:00
|
|
|
@make -C test wipe-cov
|
2016-11-16 19:50:24 +01:00
|
|
|
|
2019-11-15 17:29:15 -05:00
|
|
|
.PHONY: test-wipe-all
|
|
|
|
test-wipe-all:
|
|
|
|
@make -C test wipe-all
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-checkstyle
|
2017-01-17 10:37:05 +01:00
|
|
|
test-checkstyle:
|
|
|
|
@make -C test checkstyle
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: test-refresh-deps
|
2019-06-21 17:04:29 +02:00
|
|
|
test-refresh-deps:
|
|
|
|
@make -C test refresh-deps
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: retest
|
2016-10-03 19:44:57 +02:00
|
|
|
retest:
|
2017-03-09 20:38:15 +01:00
|
|
|
$(call test,vpp,vpp,retest)
|
2016-10-03 19:44:57 +02:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: retest-debug
|
2016-10-03 19:44:57 +02:00
|
|
|
retest-debug:
|
2017-03-09 20:38:15 +01:00
|
|
|
$(call test,vpp,vpp_debug,retest)
|
2016-10-03 19:44:57 +02:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: retest-all
|
|
|
|
retest-all:
|
|
|
|
$(eval EXTENDED_TESTS=yes)
|
|
|
|
$(call test,vpp,vpp,retest)
|
|
|
|
|
|
|
|
.PHONY: retest-all-debug
|
|
|
|
retest-all-debug:
|
|
|
|
$(eval EXTENDED_TESTS=yes)
|
|
|
|
$(call test,vpp,vpp_debug,retest)
|
|
|
|
|
2016-02-10 00:36:06 +01:00
|
|
|
ifeq ("$(wildcard $(STARTUP_CONF))","")
|
|
|
|
define run
|
|
|
|
@echo "WARNING: STARTUP_CONF not defined or file doesn't exist."
|
|
|
|
@echo " Running with minimal startup config: $(MINIMAL_STARTUP_CONF)\n"
|
2016-07-07 17:56:48 +02:00
|
|
|
@cd $(STARTUP_DIR) && \
|
2018-04-05 21:32:29 +02:00
|
|
|
$(SUDO) $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF)
|
2016-02-10 00:36:06 +01:00
|
|
|
endef
|
|
|
|
else
|
|
|
|
define run
|
2016-07-07 17:56:48 +02:00
|
|
|
@cd $(STARTUP_DIR) && \
|
2018-04-05 21:32:29 +02:00
|
|
|
$(SUDO) $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//')
|
2016-02-10 00:36:06 +01:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2016-03-16 22:49:05 +01:00
|
|
|
%.files: .FORCE
|
|
|
|
@find . \( -name '*\.[chyS]' -o -name '*\.java' -o -name '*\.lex' \) -and \
|
|
|
|
\( -not -path './build-root*' -o -path \
|
|
|
|
'./build-root/build-vpp_debug-native/dpdk*' \) > $@
|
|
|
|
|
|
|
|
.FORCE:
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: run
|
2016-02-10 00:36:06 +01:00
|
|
|
run:
|
2016-07-07 17:56:48 +02:00
|
|
|
$(call run, $(BR)/install-$(PLATFORM)_debug-native)
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: run-release
|
2016-02-10 00:36:06 +01:00
|
|
|
run-release:
|
2016-07-07 17:56:48 +02:00
|
|
|
$(call run, $(BR)/install-$(PLATFORM)-native)
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: debug
|
2016-02-10 00:36:06 +01:00
|
|
|
debug:
|
2016-07-07 17:56:48 +02:00
|
|
|
$(call run, $(BR)/install-$(PLATFORM)_debug-native,$(GDB) $(GDB_ARGS) --args)
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: build-coverity
|
2018-07-19 14:39:40 +02:00
|
|
|
build-coverity:
|
2017-01-04 17:24:32 -05:00
|
|
|
$(call make,$(PLATFORM)_coverity,install-packages)
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: debug-release
|
2016-02-10 00:36:06 +01:00
|
|
|
debug-release:
|
2016-07-07 17:56:48 +02:00
|
|
|
$(call run, $(BR)/install-$(PLATFORM)-native,$(GDB) $(GDB_ARGS) --args)
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: build-vat
|
2016-02-10 00:36:06 +01:00
|
|
|
build-vat:
|
2016-03-16 22:49:05 +01:00
|
|
|
$(call make,$(PLATFORM)_debug,vpp-api-test-install)
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: run-vat
|
2016-02-10 00:36:06 +01:00
|
|
|
run-vat:
|
2018-04-05 21:32:29 +02:00
|
|
|
@$(SUDO) $(BR)/install-$(PLATFORM)_debug-native/vpp/bin/vpp_api_test
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: pkg-deb
|
2017-01-10 10:39:21 +01:00
|
|
|
pkg-deb:
|
2019-01-18 13:28:22 +01:00
|
|
|
$(call make,$(PLATFORM),vpp-package-deb)
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: vom-pkg-deb
|
|
|
|
vom-pkg-deb: pkg-deb
|
2019-02-12 17:24:17 +01:00
|
|
|
$(call make,$(PLATFORM),vom-package-deb)
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: pkg-deb-debug
|
2019-01-18 13:28:22 +01:00
|
|
|
pkg-deb-debug:
|
|
|
|
$(call make,$(PLATFORM)_debug,vpp-package-deb)
|
2016-02-10 00:36:06 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: vom-pkg-deb-debug
|
|
|
|
vom-pkg-deb-debug: pkg-deb-debug
|
2019-02-12 17:24:17 +01:00
|
|
|
$(call make,$(PLATFORM)_debug,vom-package-deb)
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: pkg-rpm
|
2017-01-10 10:39:21 +01:00
|
|
|
pkg-rpm: dist
|
2017-04-18 15:26:39 +02:00
|
|
|
make -C extras/rpm
|
2016-03-16 22:49:05 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: pkg-srpm
|
2017-07-19 19:17:15 -04:00
|
|
|
pkg-srpm: dist
|
|
|
|
make -C extras/rpm srpm
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: dpdk-install-dev
|
2017-01-09 20:24:50 +01:00
|
|
|
dpdk-install-dev:
|
2018-10-26 04:42:31 -07:00
|
|
|
$(call banner,"This command is deprecated. Please use 'make install-ext-deps'")
|
2018-09-18 18:41:38 +02:00
|
|
|
make -C build/external install-$(PKG)
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: install-ext-deps
|
2018-09-18 18:41:38 +02:00
|
|
|
install-ext-deps:
|
|
|
|
make -C build/external install-$(PKG)
|
2017-01-09 20:24:50 +01:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: install-ext-dep
|
|
|
|
install-ext-dep: install-ext-deps
|
|
|
|
|
|
|
|
.PHONY: json-api-files
|
2019-07-15 15:22:31 -04:00
|
|
|
json-api-files:
|
|
|
|
$(WS_ROOT)/src/tools/vppapigen/generate_json.py
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: json-api-files-debug
|
2019-07-15 15:22:31 -04:00
|
|
|
json-api-files-debug:
|
|
|
|
$(WS_ROOT)/src/tools/vppapigen/generate_json.py --debug-target
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: ctags
|
2016-03-16 22:49:05 +01:00
|
|
|
ctags: ctags.files
|
|
|
|
@ctags --totals --tag-relative -L $<
|
|
|
|
@rm $<
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: gtags
|
2016-07-02 17:54:36 -07:00
|
|
|
gtags: ctags
|
|
|
|
@gtags --gtagslabel=ctags
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: cscope
|
2016-03-16 22:49:05 +01:00
|
|
|
cscope: cscope.files
|
|
|
|
@cscope -b -q -v
|
2016-04-26 08:01:31 +02:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: checkstyle
|
2016-09-07 13:10:50 +02:00
|
|
|
checkstyle:
|
|
|
|
@build-root/scripts/checkstyle.sh
|
2019-11-13 12:32:28 -05:00
|
|
|
yamllint $(WS_ROOT)/src
|
2016-09-07 13:10:50 +02:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: checkstyle-commit
|
|
|
|
checkstyle-commit:
|
|
|
|
@extras/scripts/check_commit_msg.sh
|
|
|
|
|
|
|
|
.PHONY: checkstyle-test
|
|
|
|
checkstyle-test: test-checkstyle
|
|
|
|
|
|
|
|
.PHONY: checkstyle-all
|
|
|
|
checkstyle-all: checkstyle-commit checkstyle checkstyle-test
|
|
|
|
|
|
|
|
.PHONY: fixstyle
|
2016-09-07 13:10:50 +02:00
|
|
|
fixstyle:
|
|
|
|
@build-root/scripts/checkstyle.sh --fix
|
2016-05-03 16:34:59 -04:00
|
|
|
|
2019-11-01 02:34:32 -04:00
|
|
|
# necessary because Bug 1696324 - Update to python3.6 breaks PyYAML dependencies
|
|
|
|
# Status: CLOSED CANTFIX
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1696324
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: centos-pyyaml
|
2019-11-01 02:34:32 -04:00
|
|
|
centos-pyyaml:
|
|
|
|
ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-7)
|
|
|
|
@python3 -m pip install pyyaml
|
|
|
|
endif
|
|
|
|
ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
|
|
|
|
@sudo -E yum install $(CONFIRM) python3-pyyaml
|
|
|
|
endif
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: featurelist
|
2019-11-01 02:34:32 -04:00
|
|
|
featurelist: centos-pyyaml
|
2019-05-14 13:24:10 +02:00
|
|
|
@build-root/scripts/fts.py --all --markdown
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: checkfeaturelist
|
2019-11-01 02:34:32 -04:00
|
|
|
checkfeaturelist: centos-pyyaml
|
2019-05-14 13:24:10 +02:00
|
|
|
@build-root/scripts/fts.py --validate --git-status
|
|
|
|
|
2016-05-13 13:41:36 -04:00
|
|
|
#
|
|
|
|
# Build the documentation
|
|
|
|
#
|
|
|
|
|
2016-07-25 16:38:11 -04:00
|
|
|
# Doxygen configuration and our utility scripts
|
|
|
|
export DOXY_DIR ?= $(WS_ROOT)/doxygen
|
|
|
|
|
|
|
|
define make-doxy
|
2017-01-15 21:30:50 +01:00
|
|
|
@OS_ID="$(OS_ID)" make -C $(DOXY_DIR) $@
|
2016-07-25 16:38:11 -04:00
|
|
|
endef
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: bootstrap-doxygen
|
2017-01-10 10:39:21 +01:00
|
|
|
bootstrap-doxygen:
|
2016-07-25 16:38:11 -04:00
|
|
|
$(call make-doxy)
|
2016-05-03 16:34:59 -04:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: doxygen
|
2019-11-15 16:58:48 -05:00
|
|
|
doxygen: bootstrap-doxygen
|
2016-07-25 16:38:11 -04:00
|
|
|
$(call make-doxy)
|
2016-05-03 16:34:59 -04:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: wipe-doxygen
|
2016-05-03 16:34:59 -04:00
|
|
|
wipe-doxygen:
|
2016-07-25 16:38:11 -04:00
|
|
|
$(call make-doxy)
|
|
|
|
|
2018-09-24 14:59:33 -04:00
|
|
|
# Sphinx Documents
|
|
|
|
export DOCS_DIR = $(WS_ROOT)/docs
|
|
|
|
export VENV_DIR = $(WS_ROOT)/sphinx_venv
|
|
|
|
export SPHINX_SCRIPTS_DIR = $(WS_ROOT)/docs/scripts
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: docs-venv
|
2018-09-24 14:59:33 -04:00
|
|
|
docs-venv:
|
|
|
|
@($(SPHINX_SCRIPTS_DIR)/sphinx-make.sh venv)
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: docs
|
2019-11-15 16:58:48 -05:00
|
|
|
docs: $(DOCS_DIR) docs-venv
|
2018-09-24 14:59:33 -04:00
|
|
|
@($(SPHINX_SCRIPTS_DIR)/sphinx-make.sh html)
|
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: docs-clean
|
2018-09-24 14:59:33 -04:00
|
|
|
docs-clean:
|
2019-11-15 16:58:48 -05:00
|
|
|
@rm -rf $(DOCS_DIR)/_build
|
|
|
|
@rm -rf $(VENV_DIR)
|
2018-09-24 14:59:33 -04:00
|
|
|
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: pkg-verify
|
2019-07-15 12:03:51 -04:00
|
|
|
pkg-verify: install-dep $(BR)/.deps.ok install-ext-deps
|
2016-11-22 17:57:30 +00:00
|
|
|
$(call banner,"Building for PLATFORM=vpp using gcc")
|
2017-05-31 15:23:59 +00:00
|
|
|
@make -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages
|
2017-04-19 14:09:07 +02:00
|
|
|
$(call banner,"Building sample-plugin")
|
|
|
|
@make -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install
|
2018-03-26 14:09:38 +02:00
|
|
|
$(call banner,"Building libmemif")
|
|
|
|
@make -C build-root PLATFORM=vpp TAG=vpp libmemif-install
|
2018-04-25 19:11:15 +02:00
|
|
|
$(call banner,"Building VOM")
|
|
|
|
@make -C build-root PLATFORM=vpp TAG=vpp vom-install
|
2017-01-09 20:24:50 +01:00
|
|
|
$(call banner,"Building $(PKG) packages")
|
2017-05-31 15:23:59 +00:00
|
|
|
@make pkg-$(PKG)
|
2019-07-10 14:00:14 +02:00
|
|
|
ifeq ($(OS_ID),ubuntu)
|
|
|
|
$(call banner,"Building VOM $(PKG) package")
|
|
|
|
@make vom-pkg-deb
|
|
|
|
endif
|
2019-07-15 12:03:51 -04:00
|
|
|
|
2018-10-26 05:55:18 -07:00
|
|
|
MAKE_VERIFY_GATE_OS ?= ubuntu-18.04
|
2019-11-14 12:19:32 -05:00
|
|
|
.PHONY: verify
|
2019-07-15 12:03:51 -04:00
|
|
|
verify: pkg-verify
|
2018-10-26 05:55:18 -07:00
|
|
|
ifeq ($(OS_ID)-$(OS_VERSION_ID),$(MAKE_VERIFY_GATE_OS))
|
2019-07-31 00:34:05 -04:00
|
|
|
$(call banner,"Testing vppapigen")
|
|
|
|
@src/tools/vppapigen/test_vppapigen.py
|
2018-08-24 13:37:45 +02:00
|
|
|
$(call banner,"Running tests")
|
2017-10-10 19:01:06 +02:00
|
|
|
@make COMPRESS_FAILED_TEST_LOGS=yes RETRIES=3 test
|
2018-10-26 05:55:18 -07:00
|
|
|
else
|
|
|
|
$(call banner,"Skipping tests. Tests under 'make verify' supported on $(MAKE_VERIFY_GATE_OS)")
|
2017-05-22 16:56:54 +02:00
|
|
|
endif
|