1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
14 export WS_ROOT=$(CURDIR)
15 export BR=$(WS_ROOT)/build-root
16 CCACHE_DIR?=$(BR)/.ccache
21 MACHINE=$(shell uname -m)
26 define disable_plugins
29 $(patsubst %,"plugin %_plugin.so { disable }",$(subst $(,), ,$(1))) \
34 MINIMAL_STARTUP_CONF=" \
37 cli-listen /run/vpp/cli.sock \
39 $(if $(wildcard startup.vpp),"exec startup.vpp",) \
41 $(if $(DPDK_CONFIG), "dpdk { $(DPDK_CONFIG) }",) \
42 $(call disable_plugins,$(DISABLED_PLUGINS)) \
45 GDB_ARGS= -ex "handle SIGUSR1 noprint nostop"
50 # We allow Darwin (MacOS) for docs generation; VPP build will still fail.
51 ifneq ($(shell uname),Darwin)
52 OS_ID = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
53 OS_VERSION_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
56 ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
58 else ifeq ($(filter rhel centos fedora opensuse opensuse-leap opensuse-tumbleweed,$(OS_ID)),$(OS_ID))
62 # on ubuntu 18.04 prefer gcc-8 if it is installed and CC is not set
63 ifeq ($(OS_VERSION_ID)-$(CC)-$(shell which gcc-8 > /dev/null; echo $$?),18.04-cc-0)
67 # +libganglia1-dev if building the gmond plugin
69 DEB_DEPENDS = curl build-essential autoconf automake ccache
70 DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-systemd
71 DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
72 DEB_DEPENDS += lcov chrpath autoconf indent clang-format libnuma-dev
73 DEB_DEPENDS += python-all python3-all python3-setuptools
74 DEB_DEPENDS += python-virtualenv python-pip check
75 DEB_DEPENDS += libboost-all-dev libffi-dev python3-ply libmbedtls-dev
76 DEB_DEPENDS += cmake ninja-build uuid-dev python3-jsonschema python3-yaml
77 DEB_DEPENDS += python3-venv # ensurepip
78 DEB_DEPENDS += python3-dev # needed for python3 -m pip install psutil
79 # python3.6 on 16.04 requires python36-dev
81 LIBFFI=libffi6 # works on all but 20.04
83 ifeq ($(OS_VERSION_ID),16.04)
84 DEB_DEPENDS += python-dev
85 DEB_DEPENDS += libssl-dev
86 else ifeq ($(OS_VERSION_ID),18.04)
87 DEB_DEPENDS += python-dev
88 DEB_DEPENDS += libssl-dev
90 else ifeq ($(OS_VERSION_ID),20.04)
92 else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
93 DEB_DEPENDS += libssl-dev
94 APT_ARGS = -t jessie-backports
95 else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-9)
96 DEB_DEPENDS += libssl1.0-dev
98 DEB_DEPENDS += libssl-dev
101 DEB_DEPENDS += $(LIBFFI)
103 RPM_DEPENDS = redhat-lsb glibc-static
104 RPM_DEPENDS += apr-devel
105 RPM_DEPENDS += numactl-devel
106 RPM_DEPENDS += check check-devel
107 RPM_DEPENDS += boost boost-devel
108 RPM_DEPENDS += selinux-policy selinux-policy-devel
109 RPM_DEPENDS += ninja-build
110 RPM_DEPENDS += libuuid-devel
111 RPM_DEPENDS += mbedtls-devel
113 ifeq ($(OS_ID),fedora)
114 RPM_DEPENDS += dnf-utils
115 RPM_DEPENDS += subunit subunit-devel
116 RPM_DEPENDS += compat-openssl10-devel
117 RPM_DEPENDS += python3-devel # needed for python3 -m pip install psutil
118 RPM_DEPENDS += python3-ply # for vppapigen
119 RPM_DEPENDS += python3-virtualenv python3-jsonschema
121 RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
122 else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
123 RPM_DEPENDS += yum-utils
124 RPM_DEPENDS += compat-openssl10
125 RPM_DEPENDS += python36-devel python3-ply
126 RPM_DEPENDS += python3-virtualenv python3-jsonschema
128 RPM_DEPENDS_GROUPS = 'Development Tools'
130 RPM_DEPENDS += yum-utils
131 RPM_DEPENDS += openssl-devel
132 RPM_DEPENDS += python36-ply # for vppapigen
133 RPM_DEPENDS += python3-devel python3-pip
134 RPM_DEPENDS += python-virtualenv python36-jsonschema
135 RPM_DEPENDS += devtoolset-7
136 RPM_DEPENDS += cmake3
137 RPM_DEPENDS_GROUPS = 'Development Tools'
140 # +ganglia-devel if building the ganglia plugin
142 RPM_DEPENDS += chrpath libffi-devel rpm-build
143 # lowercase- replace spaces with dashes.
144 SUSE_NAME= $(shell grep '^NAME=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | sed -e 's/ /-/' | awk '{print tolower($$0)}')
145 SUSE_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2)
146 RPM_SUSE_BUILDTOOLS_DEPS = autoconf automake ccache check-devel chrpath
147 RPM_SUSE_BUILDTOOLS_DEPS += clang cmake indent libtool make ninja python3-ply
149 RPM_SUSE_DEVEL_DEPS = glibc-devel-static libnuma-devel
150 RPM_SUSE_DEVEL_DEPS += libopenssl-devel openssl-devel mbedtls-devel libuuid-devel
152 RPM_SUSE_PYTHON_DEPS = python-devel python3-devel python-pip python3-pip
153 RPM_SUSE_PYTHON_DEPS += python-rpm-macros python3-rpm-macros
155 RPM_SUSE_PLATFORM_DEPS = distribution-release shadow rpm-build
157 ifeq ($(OS_ID),opensuse)
158 ifeq ($(SUSE_NAME),tumbleweed)
159 RPM_SUSE_DEVEL_DEPS = libboost_headers1_68_0-devel-1.68.0 libboost_thread1_68_0-devel-1.68.0 gcc
160 RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
162 ifeq ($(SUSE_ID),15.0)
163 RPM_SUSE_DEVEL_DEPS += libboost_headers-devel libboost_thread-devel gcc
164 RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
166 RPM_SUSE_DEVEL_DEPS += libboost_headers1_68_0-devel-1.68.0 gcc6
167 RPM_SUSE_PYTHON_DEPS += python-virtualenv
171 ifeq ($(OS_ID),opensuse-leap)
172 ifeq ($(SUSE_ID),15.0)
173 RPM_SUSE_DEVEL_DEPS += libboost_headers-devel libboost_thread-devel gcc git curl
174 RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
178 RPM_SUSE_DEPENDS += $(RPM_SUSE_BUILDTOOLS_DEPS) $(RPM_SUSE_DEVEL_DEPS) $(RPM_SUSE_PYTHON_DEPS) $(RPM_SUSE_PLATFORM_DEPS)
180 ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
181 STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf
184 ifeq ($(findstring y,$(UNATTENDED)),y)
191 ifneq ($(SAMPLE_PLUGIN),no)
192 TARGETS += sample-plugin
196 @echo "========================================================================"
198 @echo "========================================================================"
204 @echo "Make Targets:"
205 @echo " install-dep[s] - install software dependencies"
206 @echo " wipe - wipe all products of debug build "
207 @echo " wipe-release - wipe all products of release build "
208 @echo " build - build debug binaries"
209 @echo " build-release - build release binaries"
210 @echo " build-coverity - build coverity artifacts"
211 @echo " rebuild - wipe and build debug binaries"
212 @echo " rebuild-release - wipe and build release binaries"
213 @echo " run - run debug binary"
214 @echo " run-release - run release binary"
215 @echo " debug - run debug binary with debugger"
216 @echo " debug-release - run release binary with debugger"
217 @echo " test - build and run tests"
218 @echo " test-help - show help on test framework"
219 @echo " run-vat - run vpp-api-test tool"
220 @echo " pkg-deb - build DEB packages"
221 @echo " pkg-deb-debug - build DEB debug packages"
222 @echo " pkg-snap - build SNAP package"
223 @echo " snap-clean - clean up snap build environment"
224 @echo " vom-pkg-deb - build vom DEB packages"
225 @echo " vom-pkg-deb-debug - build vom DEB debug packages"
226 @echo " pkg-rpm - build RPM packages"
227 @echo " install-ext-dep[s] - install external development dependencies"
228 @echo " ctags - (re)generate ctags database"
229 @echo " gtags - (re)generate gtags database"
230 @echo " cscope - (re)generate cscope database"
231 @echo " checkstyle - check coding style"
232 @echo " checkstyle-commit - check commit message format"
233 @echo " checkstyle-test - check test framework coding style"
234 @echo " fixstyle - fix coding style"
235 @echo " doxygen - (re)generate documentation"
236 @echo " bootstrap-doxygen - setup Doxygen dependencies"
237 @echo " wipe-doxygen - wipe all generated documentation"
238 @echo " checkfeaturelist - check FEATURE.yaml according to schema"
239 @echo " featurelist - dump feature list in markdown"
240 @echo " json-api-files - (re)-generate json api files"
241 @echo " json-api-files-debug - (re)-generate json api files for debug target"
242 @echo " docs - Build the Sphinx documentation"
243 @echo " docs-venv - Build the virtual environment for the Sphinx docs"
244 @echo " docs-clean - Remove the generated files from the Sphinx docs"
246 @echo "Make Arguments:"
247 @echo " V=[0|1] - set build verbosity level"
248 @echo " STARTUP_CONF=<path> - startup configuration file"
249 @echo " (e.g. /etc/vpp/startup.conf)"
250 @echo " STARTUP_DIR=<path> - startup directory (e.g. /etc/vpp)"
251 @echo " It also sets STARTUP_CONF if"
252 @echo " startup.conf file is present"
253 @echo " GDB=<path> - gdb binary to use for debugging"
254 @echo " PLATFORM=<name> - target platform. default is vpp"
255 @echo " TEST=<filter> - apply filter to test set, see test-help"
256 @echo " DPDK_CONFIG=<conf> - add specified dpdk config commands to"
257 @echo " autogenerated startup.conf"
258 @echo " (e.g. \"no-pci\" )"
259 @echo " SAMPLE_PLUGIN=yes - in addition build/run/debug sample plugin"
260 @echo " DISABLED_PLUGINS=<list> - comma separated list of plugins which"
261 @echo " should not be loaded"
263 @echo "Current Argument Values:"
265 @echo " STARTUP_CONF = $(STARTUP_CONF)"
266 @echo " STARTUP_DIR = $(STARTUP_DIR)"
267 @echo " GDB = $(GDB)"
268 @echo " PLATFORM = $(PLATFORM)"
269 @echo " DPDK_VERSION = $(DPDK_VERSION)"
270 @echo " DPDK_CONFIG = $(DPDK_CONFIG)"
271 @echo " SAMPLE_PLUGIN = $(SAMPLE_PLUGIN)"
272 @echo " DISABLED_PLUGINS = $(DISABLED_PLUGINS)"
275 ifeq ($(findstring y,$(UNATTENDED)),y)
278 ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
279 @MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \
280 if [ -n "$$MISSING" ] ; then \
281 echo "\nPlease install missing packages: \n$$MISSING\n" ; \
282 echo "by executing \"make install-dep\"\n" ; \
286 else ifneq ("$(wildcard /etc/redhat-release)","")
287 @for i in $(RPM_DEPENDS) ; do \
288 RPM=$$(basename -s .rpm "$${i##*/}" | cut -d- -f1,2,3) ; \
289 MISSING+=$$(rpm -q $$RPM | grep "^package") ; \
291 if [ -n "$$MISSING" ] ; then \
292 echo "Please install missing RPMs: \n$$MISSING\n" ; \
293 echo "by executing \"make install-dep\"\n" ; \
302 @echo "'make bootstrap' is not needed anymore"
306 ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
307 ifeq ($(OS_VERSION_ID),14.04)
308 @sudo -E apt-get $(CONFIRM) $(FORCE) install software-properties-common
310 ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
311 @grep -q jessie-backports /etc/apt/sources.list /etc/apt/sources.list.d/* 2> /dev/null \
312 || ( echo "Please install jessie-backports" ; exit 1 )
314 @sudo -E apt-get update
315 @sudo -E apt-get $(APT_ARGS) $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
316 else ifneq ("$(wildcard /etc/redhat-release)","")
318 @sudo -E yum-config-manager --enable rhel-server-rhscl-7-rpms
319 @sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
320 @sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
321 @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
322 else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
323 @sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
324 @sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
325 else ifeq ($(OS_ID),centos)
326 @sudo -E yum install $(CONFIRM) centos-release-scl-rh epel-release
327 @sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
328 @sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
329 @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
330 else ifeq ($(OS_ID),fedora)
331 @sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
332 @sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
333 @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
335 else ifeq ($(filter opensuse-tumbleweed,$(OS_ID)),$(OS_ID))
336 @sudo -E zypper refresh
337 @sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
338 else ifeq ($(filter opensuse-leap,$(OS_ID)),$(OS_ID))
339 @sudo -E zypper refresh
340 @sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
341 else ifeq ($(filter opensuse,$(OS_ID)),$(OS_ID))
342 @sudo -E zypper refresh
343 @sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
345 $(error "This option currently works only on Ubuntu, Debian, RHEL, CentOS or openSUSE systems")
347 git config commit.template .git_commit_template.txt
350 install-deps: install-dep
353 @make -C $(BR) PLATFORM=$(PLATFORM) TAG=$(1) $(2)
356 $(BR)/scripts/.version:
357 ifneq ("$(wildcard /etc/redhat-release)","")
358 $(shell $(BR)/scripts/version rpm-string > $(BR)/scripts/.version)
360 $(shell $(BR)/scripts/version > $(BR)/scripts/.version)
363 DIST_FILE = $(BR)/vpp-$(shell src/scripts/version).tar
364 DIST_SUBDIR = vpp-$(shell src/scripts/version|cut -f1 -d-)
368 @if git rev-parse 2> /dev/null ; then \
370 --prefix=$(DIST_SUBDIR)/ \
374 git describe > $(BR)/.version ; \
376 (cd .. ; tar -cf $(DIST_FILE) $(DIST_SUBDIR) --exclude=*.tar) ; \
377 src/scripts/version > $(BR)/.version ; \
380 --file $(DIST_FILE) \
381 --transform='s,.*/.version,$(DIST_SUBDIR)/src/scripts/.version,' \
383 @$(RM) $(BR)/.version $(DIST_FILE).xz
384 @xz -v --threads=0 $(DIST_FILE)
385 @$(RM) $(BR)/vpp-latest.tar.xz
386 @ln -rs $(DIST_FILE).xz $(BR)/vpp-latest.tar.xz
389 build: $(BR)/.deps.ok
390 $(call make,$(PLATFORM)_debug,$(addsuffix -install,$(TARGETS)))
394 @$(RM) $(BR)/*.tar.xz
397 wipe: wipedist test-wipe $(BR)/.deps.ok
398 $(call make,$(PLATFORM)_debug,$(addsuffix -wipe,$(TARGETS)))
399 @find . -type f -name "*.api.json" ! -path "./test/*" -exec rm {} \;
404 .PHONY: build-release
405 build-release: $(BR)/.deps.ok
406 $(call make,$(PLATFORM),$(addsuffix -install,$(TARGETS)))
409 wipe-release: test-wipe $(BR)/.deps.ok
410 $(call make,$(PLATFORM),$(addsuffix -wipe,$(TARGETS)))
412 .PHONY: rebuild-release
413 rebuild-release: wipe-release build-release
415 libexpand = $(subst $(subst ,, ),:,$(foreach lib,$(1),$(BR)/install-$(2)-native/vpp/$(lib)/$(3)))
417 export TEST_DIR ?= $(WS_ROOT)/test
418 export RND_SEED ?= $(shell python3 -c 'import time; print(time.time())')
421 $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-install,)
422 $(eval libs:=lib lib64)
424 VPP_BUILD_DIR=$(BR)/build-$(2)-native \
425 VPP_BIN=$(BR)/install-$(2)-native/vpp/bin/vpp \
426 VPP_PLUGIN_PATH=$(call libexpand,$(libs),$(2),vpp_plugins) \
427 VPP_TEST_PLUGIN_PATH=$(call libexpand,$(libs),$(2),vpp_api_test_plugins) \
428 VPP_INSTALL_PATH=$(BR)/install-$(2)-native/ \
429 LD_LIBRARY_PATH=$(call libexpand,$(libs),$(2),) \
430 EXTENDED_TESTS=$(EXTENDED_TESTS) \
433 RND_SEED=$(RND_SEED) \
434 CACHE_OUTPUT=$(CACHE_OUTPUT) \
440 $(call test,vpp,vpp,test)
444 $(call test,vpp,vpp_debug,test)
448 $(call test,vpp,vpp_gcov,test)
452 $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=vpp TAG=vpp vom-install,)
453 $(eval EXTENDED_TESTS=yes)
454 $(call test,vpp,vpp,test)
456 .PHONY: test-all-debug
458 $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=vpp TAG=vpp_debug vom-install,)
459 $(eval EXTENDED_TESTS=yes)
460 $(call test,vpp,vpp_debug,test)
463 papi-wipe: test-wipe-papi
464 $(call banner,"This command is deprecated. Please use 'test-wipe-papi'")
466 .PHONY: test-wipe-papi
468 @make -C test wipe-papi
480 $(call test,vpp,vpp,shell)
482 .PHONY: test-shell-debug
484 $(call test,vpp,vpp_debug,shell)
486 .PHONY: test-shell-gcov
488 $(call test,vpp,vpp_gcov,shell)
492 @make -C test test-dep
498 .PHONY: test-wipe-doc
500 @make -C test wipe-doc
504 @make -C $(BR) PLATFORM=vpp TAG=vpp_gcov vom-install
505 $(eval EXTENDED_TESTS=yes)
506 $(call test,vpp,vpp_gcov,cov)
508 .PHONY: test-wipe-cov
510 @make -C test wipe-cov
512 .PHONY: test-wipe-all
514 @make -C test wipe-all
516 .PHONY: test-checkstyle
518 @make -C test checkstyle
520 .PHONY: test-refresh-deps
522 @make -C test refresh-deps
526 $(call test,vpp,vpp,retest)
530 $(call test,vpp,vpp_debug,retest)
534 $(eval EXTENDED_TESTS=yes)
535 $(call test,vpp,vpp,retest)
537 .PHONY: retest-all-debug
539 $(eval EXTENDED_TESTS=yes)
540 $(call test,vpp,vpp_debug,retest)
542 ifeq ("$(wildcard $(STARTUP_CONF))","")
544 @echo "WARNING: STARTUP_CONF not defined or file doesn't exist."
545 @echo " Running with minimal startup config: $(MINIMAL_STARTUP_CONF)\n"
546 @cd $(STARTUP_DIR) && \
547 $(SUDO) $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF)
551 @cd $(STARTUP_DIR) && \
552 $(SUDO) $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//')
557 @find . \( -name '*\.[chyS]' -o -name '*\.java' -o -name '*\.lex' \) -and \
558 \( -not -path './build-root*' -o -path \
559 './build-root/build-vpp_debug-native/dpdk*' \) > $@
565 $(call run, $(BR)/install-$(PLATFORM)_debug-native)
569 $(call run, $(BR)/install-$(PLATFORM)-native)
573 $(call run, $(BR)/install-$(PLATFORM)_debug-native,$(GDB) $(GDB_ARGS) --args)
575 .PHONY: build-coverity
577 $(call make,$(PLATFORM)_coverity,install-packages)
579 .PHONY: debug-release
581 $(call run, $(BR)/install-$(PLATFORM)-native,$(GDB) $(GDB_ARGS) --args)
585 $(call make,$(PLATFORM)_debug,vpp-api-test-install)
589 @$(SUDO) $(BR)/install-$(PLATFORM)_debug-native/vpp/bin/vpp_api_test
593 $(call make,$(PLATFORM),vpp-package-deb)
599 SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=8G \
600 SNAPCRAFT_BUILD_ENVIRONMENT_CPU=6 \
611 $(call make,$(PLATFORM),vom-package-deb)
613 .PHONY: pkg-deb-debug
615 $(call make,$(PLATFORM)_debug,vpp-package-deb)
617 .PHONY: vom-pkg-deb-debug
618 vom-pkg-deb-debug: pkg-deb-debug
619 $(call make,$(PLATFORM)_debug,vom-package-deb)
627 make -C extras/rpm srpm
629 .PHONY: dpdk-install-dev
631 $(call banner,"This command is deprecated. Please use 'make install-ext-deps'")
632 make -C build/external install-$(PKG)
634 .PHONY: install-ext-deps
636 make -C build/external install-$(PKG)
638 .PHONY: install-ext-dep
639 install-ext-dep: install-ext-deps
641 .PHONY: json-api-files
643 $(WS_ROOT)/src/tools/vppapigen/generate_json.py
645 .PHONY: json-api-files-debug
646 json-api-files-debug:
647 $(WS_ROOT)/src/tools/vppapigen/generate_json.py --debug-target
651 @ctags --totals --tag-relative -L $<
656 @gtags --gtagslabel=ctags
663 checkstyle: checkfeaturelist
664 @build-root/scripts/checkstyle.sh
666 .PHONY: checkstyle-commit
668 @extras/scripts/check_commit_msg.sh
670 .PHONY: checkstyle-test
671 checkstyle-test: test-checkstyle
673 .PHONY: checkstyle-all
674 checkstyle-all: checkstyle-commit checkstyle checkstyle-test
678 @build-root/scripts/checkstyle.sh --fix
680 # necessary because Bug 1696324 - Update to python3.6 breaks PyYAML dependencies
681 # Status: CLOSED CANTFIX
682 # https://bugzilla.redhat.com/show_bug.cgi?id=1696324
683 .PHONY: centos-pyyaml
685 ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-7)
686 @python3 -m pip install pyyaml
688 ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
689 @sudo -E yum install $(CONFIRM) python3-pyyaml
693 featurelist: centos-pyyaml
694 @build-root/scripts/fts.py --all --markdown
696 .PHONY: checkfeaturelist
697 checkfeaturelist: centos-pyyaml
698 @build-root/scripts/fts.py --validate --all
701 # Build the documentation
704 # Doxygen configuration and our utility scripts
705 export DOXY_DIR ?= $(WS_ROOT)/doxygen
708 @OS_ID="$(OS_ID)" make -C $(DOXY_DIR) $@
711 .PHONY: bootstrap-doxygen
716 doxygen: bootstrap-doxygen
724 export DOCS_DIR = $(WS_ROOT)/docs
725 export VENV_DIR = $(WS_ROOT)/sphinx_venv
726 export SPHINX_SCRIPTS_DIR = $(WS_ROOT)/docs/scripts
730 @($(SPHINX_SCRIPTS_DIR)/sphinx-make.sh venv)
734 @($(SPHINX_SCRIPTS_DIR)/sphinx-make.sh html)
738 @rm -rf $(DOCS_DIR)/_build
742 pkg-verify: install-dep $(BR)/.deps.ok install-ext-deps
743 $(call banner,"Building for PLATFORM=vpp using gcc")
744 @make -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages
745 $(call banner,"Building sample-plugin")
746 @make -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install
747 $(call banner,"Building libmemif")
748 @make -C build-root PLATFORM=vpp TAG=vpp libmemif-install
749 $(call banner,"Building VOM")
750 @make -C build-root PLATFORM=vpp TAG=vpp vom-install
751 $(call banner,"Building $(PKG) packages")
753 ifeq ($(OS_ID),ubuntu)
754 $(call banner,"Building VOM $(PKG) package")
758 MAKE_VERIFY_GATE_OS ?= ubuntu-18.04
761 ifeq ($(OS_ID)-$(OS_VERSION_ID),$(MAKE_VERIFY_GATE_OS))
762 $(call banner,"Testing vppapigen")
763 @src/tools/vppapigen/test_vppapigen.py
764 $(call banner,"Running tests")
765 @make COMPRESS_FAILED_TEST_LOGS=yes RETRIES=3 test
767 $(call banner,"Skipping tests. Tests under 'make verify' supported on $(MAKE_VERIFY_GATE_OS)")