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 # +libganglia1-dev if building the gmond plugin
64 DEB_DEPENDS = curl build-essential autoconf automake ccache
65 DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-systemd
66 DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
67 DEB_DEPENDS += lcov chrpath autoconf indent clang-format libnuma-dev
68 DEB_DEPENDS += python-all python3-all python3-setuptools
69 DEB_DEPENDS += python-virtualenv python-pip check
70 DEB_DEPENDS += libboost-all-dev libffi-dev python3-ply libmbedtls-dev
71 DEB_DEPENDS += cmake ninja-build uuid-dev python3-jsonschema python3-yaml
72 DEB_DEPENDS += python3-venv # ensurepip
73 DEB_DEPENDS += python3-dev # needed for python3 -m pip install psutil
74 # python3.6 on 16.04 requires python36-dev
76 LIBFFI=libffi6 # works on all but 20.04
78 ifeq ($(OS_VERSION_ID),16.04)
79 DEB_DEPENDS += python-dev
80 DEB_DEPENDS += libssl-dev
81 else ifeq ($(OS_VERSION_ID),18.04)
82 DEB_DEPENDS += python-dev
83 DEB_DEPENDS += libssl-dev
84 DEB_DEPENDS += clang-9
85 else ifeq ($(OS_VERSION_ID),20.04)
87 else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
88 DEB_DEPENDS += libssl-dev
89 APT_ARGS = -t jessie-backports
90 else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-9)
91 DEB_DEPENDS += libssl1.0-dev
93 DEB_DEPENDS += libssl-dev
96 DEB_DEPENDS += $(LIBFFI)
98 RPM_DEPENDS = redhat-lsb glibc-static
99 RPM_DEPENDS += apr-devel
100 RPM_DEPENDS += numactl-devel
101 RPM_DEPENDS += check check-devel
102 RPM_DEPENDS += boost boost-devel
103 RPM_DEPENDS += selinux-policy selinux-policy-devel
104 RPM_DEPENDS += ninja-build
105 RPM_DEPENDS += libuuid-devel
106 RPM_DEPENDS += mbedtls-devel
108 ifeq ($(OS_ID),fedora)
109 RPM_DEPENDS += dnf-utils
110 RPM_DEPENDS += subunit subunit-devel
111 RPM_DEPENDS += compat-openssl10-devel
112 RPM_DEPENDS += python3-devel # needed for python3 -m pip install psutil
113 RPM_DEPENDS += python3-ply # for vppapigen
114 RPM_DEPENDS += python3-virtualenv python3-jsonschema
116 RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
117 else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
118 RPM_DEPENDS += yum-utils
119 RPM_DEPENDS += compat-openssl10
120 RPM_DEPENDS += python36-devel python3-ply
121 RPM_DEPENDS += python3-virtualenv python3-jsonschema
123 RPM_DEPENDS_GROUPS = 'Development Tools'
125 RPM_DEPENDS += yum-utils
126 RPM_DEPENDS += openssl-devel
127 RPM_DEPENDS += python36-ply # for vppapigen
128 RPM_DEPENDS += python3-devel python3-pip
129 RPM_DEPENDS += python-virtualenv python36-jsonschema
130 RPM_DEPENDS += devtoolset-9
131 RPM_DEPENDS += cmake3
132 RPM_DEPENDS_GROUPS = 'Development Tools'
135 # +ganglia-devel if building the ganglia plugin
137 RPM_DEPENDS += chrpath libffi-devel rpm-build
138 # lowercase- replace spaces with dashes.
139 SUSE_NAME= $(shell grep '^NAME=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | sed -e 's/ /-/' | awk '{print tolower($$0)}')
140 SUSE_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2)
141 RPM_SUSE_BUILDTOOLS_DEPS = autoconf automake ccache check-devel chrpath
142 RPM_SUSE_BUILDTOOLS_DEPS += clang cmake indent libtool make ninja python3-ply
144 RPM_SUSE_DEVEL_DEPS = glibc-devel-static libnuma-devel
145 RPM_SUSE_DEVEL_DEPS += libopenssl-devel openssl-devel mbedtls-devel libuuid-devel
147 RPM_SUSE_PYTHON_DEPS = python-devel python3-devel python-pip python3-pip
148 RPM_SUSE_PYTHON_DEPS += python-rpm-macros python3-rpm-macros
150 RPM_SUSE_PLATFORM_DEPS = distribution-release shadow rpm-build
152 ifeq ($(OS_ID),opensuse)
153 ifeq ($(SUSE_NAME),tumbleweed)
154 RPM_SUSE_DEVEL_DEPS = libboost_headers1_68_0-devel-1.68.0 libboost_thread1_68_0-devel-1.68.0 gcc
155 RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
157 ifeq ($(SUSE_ID),15.0)
158 RPM_SUSE_DEVEL_DEPS += libboost_headers-devel libboost_thread-devel gcc
159 RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
161 RPM_SUSE_DEVEL_DEPS += libboost_headers1_68_0-devel-1.68.0 gcc6
162 RPM_SUSE_PYTHON_DEPS += python-virtualenv
166 ifeq ($(OS_ID),opensuse-leap)
167 ifeq ($(SUSE_ID),15.0)
168 RPM_SUSE_DEVEL_DEPS += libboost_headers-devel libboost_thread-devel gcc git curl
169 RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
173 RPM_SUSE_DEPENDS += $(RPM_SUSE_BUILDTOOLS_DEPS) $(RPM_SUSE_DEVEL_DEPS) $(RPM_SUSE_PYTHON_DEPS) $(RPM_SUSE_PLATFORM_DEPS)
175 ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
176 STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf
179 ifeq ($(findstring y,$(UNATTENDED)),y)
186 ifneq ($(SAMPLE_PLUGIN),no)
187 TARGETS += sample-plugin
191 @echo "========================================================================"
193 @echo "========================================================================"
199 @echo "Make Targets:"
200 @echo " install-dep[s] - install software dependencies"
201 @echo " wipe - wipe all products of debug build "
202 @echo " wipe-release - wipe all products of release build "
203 @echo " build - build debug binaries"
204 @echo " build-release - build release binaries"
205 @echo " build-coverity - build coverity artifacts"
206 @echo " rebuild - wipe and build debug binaries"
207 @echo " rebuild-release - wipe and build release binaries"
208 @echo " run - run debug binary"
209 @echo " run-release - run release binary"
210 @echo " debug - run debug binary with debugger"
211 @echo " debug-release - run release binary with debugger"
212 @echo " test - build and run tests"
213 @echo " test-help - show help on test framework"
214 @echo " run-vat - run vpp-api-test tool"
215 @echo " pkg-deb - build DEB packages"
216 @echo " pkg-deb-debug - build DEB debug packages"
217 @echo " pkg-snap - build SNAP package"
218 @echo " snap-clean - clean up snap build environment"
219 @echo " vom-pkg-deb - build vom DEB packages"
220 @echo " vom-pkg-deb-debug - build vom DEB debug packages"
221 @echo " pkg-rpm - build RPM packages"
222 @echo " install-ext-dep[s] - install external development dependencies"
223 @echo " ctags - (re)generate ctags database"
224 @echo " gtags - (re)generate gtags database"
225 @echo " cscope - (re)generate cscope database"
226 @echo " compdb - (re)generate compile_commands.json"
227 @echo " checkstyle - check coding style"
228 @echo " checkstyle-commit - check commit message format"
229 @echo " checkstyle-test - check test framework coding style"
230 @echo " checkstyle-api - check api for incompatible changes"
231 @echo " fixstyle - fix coding style"
232 @echo " doxygen - (re)generate documentation"
233 @echo " bootstrap-doxygen - setup Doxygen dependencies"
234 @echo " wipe-doxygen - wipe all generated documentation"
235 @echo " checkfeaturelist - check FEATURE.yaml according to schema"
236 @echo " featurelist - dump feature list in markdown"
237 @echo " json-api-files - (re)-generate json api files"
238 @echo " json-api-files-debug - (re)-generate json api files for debug target"
239 @echo " docs - Build the Sphinx documentation"
240 @echo " docs-venv - Build the virtual environment for the Sphinx docs"
241 @echo " docs-clean - Remove the generated files from the Sphinx docs"
243 @echo "Make Arguments:"
244 @echo " V=[0|1] - set build verbosity level"
245 @echo " STARTUP_CONF=<path> - startup configuration file"
246 @echo " (e.g. /etc/vpp/startup.conf)"
247 @echo " STARTUP_DIR=<path> - startup directory (e.g. /etc/vpp)"
248 @echo " It also sets STARTUP_CONF if"
249 @echo " startup.conf file is present"
250 @echo " GDB=<path> - gdb binary to use for debugging"
251 @echo " PLATFORM=<name> - target platform. default is vpp"
252 @echo " TEST=<filter> - apply filter to test set, see test-help"
253 @echo " DPDK_CONFIG=<conf> - add specified dpdk config commands to"
254 @echo " autogenerated startup.conf"
255 @echo " (e.g. \"no-pci\" )"
256 @echo " SAMPLE_PLUGIN=yes - in addition build/run/debug sample plugin"
257 @echo " DISABLED_PLUGINS=<list> - comma separated list of plugins which"
258 @echo " should not be loaded"
260 @echo "Current Argument Values:"
262 @echo " STARTUP_CONF = $(STARTUP_CONF)"
263 @echo " STARTUP_DIR = $(STARTUP_DIR)"
264 @echo " GDB = $(GDB)"
265 @echo " PLATFORM = $(PLATFORM)"
266 @echo " DPDK_VERSION = $(DPDK_VERSION)"
267 @echo " DPDK_CONFIG = $(DPDK_CONFIG)"
268 @echo " SAMPLE_PLUGIN = $(SAMPLE_PLUGIN)"
269 @echo " DISABLED_PLUGINS = $(DISABLED_PLUGINS)"
272 ifeq ($(findstring y,$(UNATTENDED)),y)
275 ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
276 @MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \
277 if [ -n "$$MISSING" ] ; then \
278 echo "\nPlease install missing packages: \n$$MISSING\n" ; \
279 echo "by executing \"make install-dep\"\n" ; \
283 else ifneq ("$(wildcard /etc/redhat-release)","")
284 @for i in $(RPM_DEPENDS) ; do \
285 RPM=$$(basename -s .rpm "$${i##*/}" | cut -d- -f1,2,3) ; \
286 MISSING+=$$(rpm -q $$RPM | grep "^package") ; \
288 if [ -n "$$MISSING" ] ; then \
289 echo "Please install missing RPMs: \n$$MISSING\n" ; \
290 echo "by executing \"make install-dep\"\n" ; \
299 @echo "'make bootstrap' is not needed anymore"
303 ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
304 ifeq ($(OS_VERSION_ID),14.04)
305 @sudo -E apt-get $(CONFIRM) $(FORCE) install software-properties-common
307 ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
308 @grep -q jessie-backports /etc/apt/sources.list /etc/apt/sources.list.d/* 2> /dev/null \
309 || ( echo "Please install jessie-backports" ; exit 1 )
311 @sudo -E apt-get update
312 @sudo -E apt-get $(APT_ARGS) $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
313 else ifneq ("$(wildcard /etc/redhat-release)","")
315 @sudo -E yum-config-manager --enable rhel-server-rhscl-7-rpms
316 @sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
317 @sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
318 @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
319 else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
320 @sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
321 @sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
322 else ifeq ($(OS_ID),centos)
323 @sudo -E yum install $(CONFIRM) centos-release-scl-rh epel-release
324 @sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
325 @sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
326 @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
327 else ifeq ($(OS_ID),fedora)
328 @sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
329 @sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
330 @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
332 else ifeq ($(filter opensuse-tumbleweed,$(OS_ID)),$(OS_ID))
333 @sudo -E zypper refresh
334 @sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
335 else ifeq ($(filter opensuse-leap,$(OS_ID)),$(OS_ID))
336 @sudo -E zypper refresh
337 @sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
338 else ifeq ($(filter opensuse,$(OS_ID)),$(OS_ID))
339 @sudo -E zypper refresh
340 @sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
342 $(error "This option currently works only on Ubuntu, Debian, RHEL, CentOS or openSUSE systems")
344 git config commit.template .git_commit_template.txt
347 install-deps: install-dep
350 @make -C $(BR) PLATFORM=$(PLATFORM) TAG=$(1) $(2)
353 $(BR)/scripts/.version:
354 ifneq ("$(wildcard /etc/redhat-release)","")
355 $(shell $(BR)/scripts/version rpm-string > $(BR)/scripts/.version)
357 $(shell $(BR)/scripts/version > $(BR)/scripts/.version)
360 DIST_FILE = $(BR)/vpp-$(shell src/scripts/version).tar
361 DIST_SUBDIR = vpp-$(shell src/scripts/version|cut -f1 -d-)
365 @if git rev-parse 2> /dev/null ; then \
367 --prefix=$(DIST_SUBDIR)/ \
371 git describe > $(BR)/.version ; \
373 (cd .. ; tar -cf $(DIST_FILE) $(DIST_SUBDIR) --exclude=*.tar) ; \
374 src/scripts/version > $(BR)/.version ; \
377 --file $(DIST_FILE) \
378 --transform='s,.*/.version,$(DIST_SUBDIR)/src/scripts/.version,' \
380 @$(RM) $(BR)/.version $(DIST_FILE).xz
381 @xz -v --threads=0 $(DIST_FILE)
382 @$(RM) $(BR)/vpp-latest.tar.xz
383 @ln -rs $(DIST_FILE).xz $(BR)/vpp-latest.tar.xz
386 build: $(BR)/.deps.ok
387 $(call make,$(PLATFORM)_debug,$(addsuffix -install,$(TARGETS)))
391 @$(RM) $(BR)/*.tar.xz
394 wipe: wipedist test-wipe $(BR)/.deps.ok
395 $(call make,$(PLATFORM)_debug,$(addsuffix -wipe,$(TARGETS)))
396 @find . -type f -name "*.api.json" ! -path "./test/*" -exec rm {} \;
401 .PHONY: build-release
402 build-release: $(BR)/.deps.ok
403 $(call make,$(PLATFORM),$(addsuffix -install,$(TARGETS)))
406 wipe-release: test-wipe $(BR)/.deps.ok
407 $(call make,$(PLATFORM),$(addsuffix -wipe,$(TARGETS)))
409 .PHONY: rebuild-release
410 rebuild-release: wipe-release build-release
412 libexpand = $(subst $(subst ,, ),:,$(foreach lib,$(1),$(BR)/install-$(2)-native/vpp/$(lib)/$(3)))
414 export TEST_DIR ?= $(WS_ROOT)/test
415 export RND_SEED ?= $(shell python3 -c 'import time; print(time.time())')
418 $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-install,)
419 $(eval libs:=lib lib64)
421 VPP_BUILD_DIR=$(BR)/build-$(2)-native \
422 VPP_BIN=$(BR)/install-$(2)-native/vpp/bin/vpp \
423 VPP_PLUGIN_PATH=$(call libexpand,$(libs),$(2),vpp_plugins) \
424 VPP_TEST_PLUGIN_PATH=$(call libexpand,$(libs),$(2),vpp_api_test_plugins) \
425 VPP_INSTALL_PATH=$(BR)/install-$(2)-native/ \
426 LD_LIBRARY_PATH=$(call libexpand,$(libs),$(2),) \
427 EXTENDED_TESTS=$(EXTENDED_TESTS) \
430 RND_SEED=$(RND_SEED) \
431 CACHE_OUTPUT=$(CACHE_OUTPUT) \
437 $(call test,vpp,vpp,test)
441 $(call test,vpp,vpp_debug,test)
445 $(call test,vpp,vpp_gcov,test)
449 $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=vpp TAG=vpp vom-install,)
450 $(eval EXTENDED_TESTS=yes)
451 $(call test,vpp,vpp,test)
453 .PHONY: test-all-debug
455 $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=vpp TAG=vpp_debug vom-install,)
456 $(eval EXTENDED_TESTS=yes)
457 $(call test,vpp,vpp_debug,test)
460 papi-wipe: test-wipe-papi
461 $(call banner,"This command is deprecated. Please use 'test-wipe-papi'")
463 .PHONY: test-wipe-papi
465 @make -C test wipe-papi
477 $(call test,vpp,vpp,shell)
479 .PHONY: test-shell-debug
481 $(call test,vpp,vpp_debug,shell)
483 .PHONY: test-shell-gcov
485 $(call test,vpp,vpp_gcov,shell)
489 @make -C test test-dep
495 .PHONY: test-wipe-doc
497 @make -C test wipe-doc
501 @make -C $(BR) PLATFORM=vpp TAG=vpp_gcov vom-install
502 $(eval EXTENDED_TESTS=yes)
503 $(call test,vpp,vpp_gcov,cov)
505 .PHONY: test-wipe-cov
507 @make -C test wipe-cov
509 .PHONY: test-wipe-all
511 @make -C test wipe-all
513 .PHONY: test-checkstyle
515 @make -C test checkstyle
517 .PHONY: test-refresh-deps
519 @make -C test refresh-deps
523 $(call test,vpp,vpp,retest)
527 $(call test,vpp,vpp_debug,retest)
531 $(eval EXTENDED_TESTS=yes)
532 $(call test,vpp,vpp,retest)
534 .PHONY: retest-all-debug
536 $(eval EXTENDED_TESTS=yes)
537 $(call test,vpp,vpp_debug,retest)
539 ifeq ("$(wildcard $(STARTUP_CONF))","")
541 @echo "WARNING: STARTUP_CONF not defined or file doesn't exist."
542 @echo " Running with minimal startup config: $(MINIMAL_STARTUP_CONF)\n"
543 @cd $(STARTUP_DIR) && \
544 $(SUDO) $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF)
548 @cd $(STARTUP_DIR) && \
549 $(SUDO) $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//')
554 @find . \( -name '*\.[chyS]' -o -name '*\.java' -o -name '*\.lex' \) -and \
555 \( -not -path './build-root*' -o -path \
556 './build-root/build-vpp_debug-native/dpdk*' \) > $@
562 $(call run, $(BR)/install-$(PLATFORM)_debug-native)
566 $(call run, $(BR)/install-$(PLATFORM)-native)
570 $(call run, $(BR)/install-$(PLATFORM)_debug-native,$(GDB) $(GDB_ARGS) --args)
572 .PHONY: build-coverity
574 $(call make,$(PLATFORM)_coverity,install-packages)
576 .PHONY: debug-release
578 $(call run, $(BR)/install-$(PLATFORM)-native,$(GDB) $(GDB_ARGS) --args)
582 $(call make,$(PLATFORM)_debug,vpp-api-test-install)
586 @$(SUDO) $(BR)/install-$(PLATFORM)_debug-native/vpp/bin/vpp_api_test
590 $(call make,$(PLATFORM),vpp-package-deb)
596 SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=8G \
597 SNAPCRAFT_BUILD_ENVIRONMENT_CPU=6 \
608 $(call make,$(PLATFORM),vom-package-deb)
610 .PHONY: pkg-deb-debug
612 $(call make,$(PLATFORM)_debug,vpp-package-deb)
614 .PHONY: vom-pkg-deb-debug
615 vom-pkg-deb-debug: pkg-deb-debug
616 $(call make,$(PLATFORM)_debug,vom-package-deb)
624 make -C extras/rpm srpm
626 .PHONY: dpdk-install-dev
628 $(call banner,"This command is deprecated. Please use 'make install-ext-deps'")
629 make -C build/external install-$(PKG)
631 .PHONY: install-ext-deps
633 make -C build/external install-$(PKG)
635 .PHONY: install-ext-dep
636 install-ext-dep: install-ext-deps
638 .PHONY: json-api-files
640 $(WS_ROOT)/src/tools/vppapigen/generate_json.py
642 .PHONY: json-api-files-debug
643 json-api-files-debug:
644 $(WS_ROOT)/src/tools/vppapigen/generate_json.py --debug-target
648 @ctags --totals --tag-relative -L $<
653 @gtags --gtagslabel=ctags
661 @ninja -C build-root/build-vpp_debug-native/vpp -t compdb > compile_commands.json
664 checkstyle: checkfeaturelist
665 @build-root/scripts/checkstyle.sh
667 .PHONY: checkstyle-commit
669 @extras/scripts/check_commit_msg.sh
671 .PHONY: checkstyle-test
672 checkstyle-test: test-checkstyle
674 .PHONY: checkstyle-all
675 checkstyle-all: checkstyle-commit checkstyle checkstyle-test
679 @build-root/scripts/checkstyle.sh --fix
681 .PHONY: checkstyle-api
683 @extras/scripts/crcchecker.py --check-patch
685 # necessary because Bug 1696324 - Update to python3.6 breaks PyYAML dependencies
686 # Status: CLOSED CANTFIX
687 # https://bugzilla.redhat.com/show_bug.cgi?id=1696324
688 .PHONY: centos-pyyaml
690 ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-7)
691 @python3 -m pip install pyyaml
693 ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
694 @sudo -E yum install $(CONFIRM) python3-pyyaml
698 featurelist: centos-pyyaml
699 @build-root/scripts/fts.py --all --markdown
701 .PHONY: checkfeaturelist
702 checkfeaturelist: centos-pyyaml
703 @build-root/scripts/fts.py --validate --all
706 # Build the documentation
709 # Doxygen configuration and our utility scripts
710 export DOXY_DIR ?= $(WS_ROOT)/doxygen
713 @OS_ID="$(OS_ID)" make -C $(DOXY_DIR) $@
716 .PHONY: bootstrap-doxygen
721 doxygen: bootstrap-doxygen
729 export DOCS_DIR = $(WS_ROOT)/docs
730 export VENV_DIR = $(WS_ROOT)/sphinx_venv
731 export SPHINX_SCRIPTS_DIR = $(WS_ROOT)/docs/scripts
735 @($(SPHINX_SCRIPTS_DIR)/sphinx-make.sh venv)
739 @($(SPHINX_SCRIPTS_DIR)/sphinx-make.sh html)
743 @rm -rf $(DOCS_DIR)/_build
747 pkg-verify: install-dep $(BR)/.deps.ok install-ext-deps
748 $(call banner,"Building for PLATFORM=vpp using gcc")
749 @make -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages
750 $(call banner,"Building sample-plugin")
751 @make -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install
752 $(call banner,"Building libmemif")
753 @make -C build-root PLATFORM=vpp TAG=vpp libmemif-install
754 $(call banner,"Building VOM")
755 @make -C build-root PLATFORM=vpp TAG=vpp vom-install
756 $(call banner,"Building $(PKG) packages")
758 ifeq ($(OS_ID),ubuntu)
759 $(call banner,"Building VOM $(PKG) package")
763 MAKE_VERIFY_GATE_OS ?= ubuntu-18.04
766 ifeq ($(OS_ID)-$(OS_VERSION_ID),$(MAKE_VERIFY_GATE_OS))
767 $(call banner,"Testing vppapigen")
768 @src/tools/vppapigen/test_vppapigen.py
769 $(call banner,"Running tests")
770 @make COMPRESS_FAILED_TEST_LOGS=yes RETRIES=3 test
772 $(call banner,"Skipping tests. Tests under 'make verify' supported on $(MAKE_VERIFY_GATE_OS)")