1 # Copyright (c) 2021 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
17 SHELL:=$(shell which bash)
22 MACHINE=$(shell uname -m)
26 ifeq ($(strip $(SHELL)),)
27 $(error "bash not found, VPP requires bash to build")
31 define disable_plugins
34 $(patsubst %,"plugin %_plugin.so { disable }",$(subst $(,), ,$(1))) \
39 MINIMAL_STARTUP_CONF=" \
42 cli-listen /run/vpp/cli.sock \
44 $(if $(wildcard startup.vpp),"exec startup.vpp",) \
46 $(if $(DPDK_CONFIG), "dpdk { $(DPDK_CONFIG) }",) \
47 $(if $(EXTRA_VPP_CONFIG), "$(EXTRA_VPP_CONFIG)",) \
48 $(call disable_plugins,$(DISABLED_PLUGINS)) \
51 GDB_ARGS= -ex "handle SIGUSR1 noprint nostop"
56 # We allow Darwin (MacOS) for docs generation; VPP build will still fail.
57 ifneq ($(shell uname),Darwin)
58 OS_ID = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
59 OS_VERSION_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
62 ifeq ($(filter ubuntu debian linuxmint,$(OS_ID)),$(OS_ID))
64 else ifeq ($(filter rhel centos fedora opensuse-leap rocky almalinux,$(OS_ID)),$(OS_ID))
68 # +libganglia1-dev if building the gmond plugin
70 DEB_DEPENDS = curl build-essential autoconf automake ccache
71 DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-python
72 DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
73 DEB_DEPENDS += gcovr lcov chrpath autoconf libnuma-dev
74 DEB_DEPENDS += python3-all python3-setuptools check
75 DEB_DEPENDS += libffi-dev python3-ply
76 DEB_DEPENDS += cmake ninja-build python3-jsonschema python3-yaml
77 DEB_DEPENDS += python3-venv # ensurepip
78 DEB_DEPENDS += python3-dev python3-pip
79 DEB_DEPENDS += libnl-3-dev libnl-route-3-dev libmnl-dev
80 # DEB_DEPENDS += enchant # for docs
81 DEB_DEPENDS += python3-virtualenv
82 DEB_DEPENDS += libssl-dev
83 DEB_DEPENDS += libelf-dev libpcap-dev # for libxdp (af_xdp)
84 DEB_DEPENDS += iperf3 # for 'make test TEST=vcl'
86 DEB_DEPENDS += iperf ethtool # for 'make test TEST=vm_vpp_interfaces'
87 DEB_DEPENDS += libpcap-dev
90 LIBFFI=libffi6 # works on all but 20.04 and debian-testing
92 ifeq ($(OS_VERSION_ID),22.04)
93 DEB_DEPENDS += python3-virtualenv
94 DEB_DEPENDS += libssl-dev
95 DEB_DEPENDS += clang clang-format-11
97 DEB_DEPENDS += enchant-2 # for docs
98 else ifeq ($(OS_VERSION_ID),20.04)
99 DEB_DEPENDS += python3-virtualenv
100 DEB_DEPENDS += libssl-dev
101 DEB_DEPENDS += clang clang-format-11
103 DEB_DEPENDS += enchant-2 # for docs
104 else ifeq ($(OS_VERSION_ID),20.10)
105 DEB_DEPENDS += clang clang-format-11
106 LIBFFI=libffi8ubuntu1
107 else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-10)
108 DEB_DEPENDS += virtualenv
109 else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-11)
110 DEB_DEPENDS += virtualenv
111 DEB_DEPENDS += clang clang-format-11
113 else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-12)
114 DEB_DEPENDS += virtualenv
115 DEB_DEPENDS += clang-14 clang-format-14
116 # for extras/scripts/checkstyle.sh
117 export CLANG_FORMAT_VER=14
120 DEB_DEPENDS += clang-11 clang-format-11
122 DEB_DEPENDS += enchant-2 # for docs
125 DEB_DEPENDS += $(LIBFFI)
127 RPM_DEPENDS = glibc-static
128 RPM_DEPENDS += apr-devel
129 RPM_DEPENDS += numactl-devel
130 RPM_DEPENDS += check check-devel
131 RPM_DEPENDS += selinux-policy selinux-policy-devel
132 RPM_DEPENDS += ninja-build
133 RPM_DEPENDS += ccache
135 RPM_DEPENDS += elfutils-libelf-devel libpcap-devel
136 RPM_DEPENDS += libnl3-devel libmnl-devel
139 ifeq ($(OS_ID),fedora)
140 RPM_DEPENDS += dnf-utils
141 RPM_DEPENDS += subunit subunit-devel
142 RPM_DEPENDS += compat-openssl10-devel
143 RPM_DEPENDS += python3-devel # needed for python3 -m pip install psutil
144 RPM_DEPENDS += python3-ply # for vppapigen
145 RPM_DEPENDS += python3-virtualenv python3-jsonschema
147 RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
148 else ifeq ($(OS_ID),rocky)
149 RPM_DEPENDS += yum-utils
150 RPM_DEPENDS += subunit subunit-devel
151 RPM_DEPENDS += openssl-devel
152 RPM_DEPENDS += python3-devel # needed for python3 -m pip install psutil
153 RPM_DEPENDS += python3-ply # for vppapigen
154 RPM_DEPENDS += python3-virtualenv python3-jsonschema
155 RPM_DEPENDS += infiniband-diags llvm clang cmake
156 RPM_DEPENDS_GROUPS = 'Development Tools'
157 else ifeq ($(OS_ID),almalinux)
158 RPM_DEPENDS += yum-utils
159 RPM_DEPENDS += subunit subunit-devel
160 RPM_DEPENDS += openssl-devel
161 RPM_DEPENDS += python3-devel # needed for python3 -m pip install psutil
162 RPM_DEPENDS += python3-ply # for vppapigen
163 RPM_DEPENDS += python3-virtualenv python3-jsonschema
164 RPM_DEPENDS += infiniband-diags llvm clang cmake
165 RPM_DEPENDS_GROUPS = 'Development Tools'
166 else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
167 RPM_DEPENDS += yum-utils
168 RPM_DEPENDS += compat-openssl10 openssl-devel
169 RPM_DEPENDS += python2-devel python36-devel python3-ply
170 RPM_DEPENDS += python3-virtualenv python3-jsonschema
171 RPM_DEPENDS += libarchive cmake
172 RPM_DEPENDS += infiniband-diags libibumad
173 RPM_DEPENDS += libpcap-devel llvm-toolset
174 RPM_DEPENDS_GROUPS = 'Development Tools'
176 RPM_DEPENDS += yum-utils
177 RPM_DEPENDS += openssl-devel
178 RPM_DEPENDS += python36-ply # for vppapigen
179 RPM_DEPENDS += python3-devel python3-pip
180 RPM_DEPENDS += python-virtualenv python36-jsonschema
181 RPM_DEPENDS += devtoolset-9 devtoolset-9-libasan-devel
182 RPM_DEPENDS += cmake3
183 RPM_DEPENDS_GROUPS = 'Development Tools'
186 # +ganglia-devel if building the ganglia plugin
188 RPM_DEPENDS += chrpath libffi-devel rpm-build
190 RPM_DEPENDS_DEBUG = glibc-debuginfo e2fsprogs-debuginfo
191 RPM_DEPENDS_DEBUG += krb5-debuginfo openssl-debuginfo
192 RPM_DEPENDS_DEBUG += zlib-debuginfo nss-softokn-debuginfo
193 RPM_DEPENDS_DEBUG += yum-plugin-auto-update-debug-info
195 RPM_SUSE_BUILDTOOLS_DEPS = autoconf automake ccache check-devel chrpath
196 RPM_SUSE_BUILDTOOLS_DEPS += clang cmake indent libtool make ninja python3-ply
198 RPM_SUSE_DEVEL_DEPS = glibc-devel-static libnuma-devel libelf-devel
199 RPM_SUSE_DEVEL_DEPS += libopenssl-devel lsb-release
200 RPM_SUSE_DEVEL_DEPS += libpcap-devel llvm-devel
201 RPM_SUSE_DEVEL_DEPS += curl libstdc++-devel bison gcc-c++ zlib-devel
203 RPM_SUSE_PYTHON_DEPS = python3-devel python3-pip python3-rpm-macros
205 RPM_SUSE_PLATFORM_DEPS = shadow rpm-build
207 ifeq ($(OS_ID),opensuse-leap)
208 RPM_SUSE_DEVEL_DEPS += xmlto openssl-devel asciidoc git nasm
209 RPM_SUSE_PYTHON_DEPS += python3 python3-ply python3-virtualenv
210 RPM_SUSE_PLATFORM_DEPS += distribution-release
213 RPM_SUSE_DEPENDS += $(RPM_SUSE_BUILDTOOLS_DEPS) $(RPM_SUSE_DEVEL_DEPS) $(RPM_SUSE_PYTHON_DEPS) $(RPM_SUSE_PLATFORM_DEPS)
215 ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
216 STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf
219 ifeq ($(findstring y,$(UNATTENDED)),y)
220 DEBIAN_FRONTEND=noninteractive
222 FORCE=--allow-downgrades --allow-remove-essential --allow-change-held-packages
227 ifneq ($(SAMPLE_PLUGIN),no)
228 TARGETS += sample-plugin
232 @echo "========================================================================"
234 @echo "========================================================================"
240 @echo "Make Targets:"
241 @echo " install-dep[s] - install software dependencies"
242 @echo " wipe - wipe all products of debug build "
243 @echo " wipe-release - wipe all products of release build "
244 @echo " build - build debug binaries"
245 @echo " build-release - build release binaries"
246 @echo " build-coverity - build coverity artifacts"
247 @echo " rebuild - wipe and build debug binaries"
248 @echo " rebuild-release - wipe and build release binaries"
249 @echo " run - run debug binary"
250 @echo " run-release - run release binary"
251 @echo " debug - run debug binary with debugger"
252 @echo " debug-release - run release binary with debugger"
253 @echo " test - build and run tests"
254 @echo " test-help - show help on test framework"
255 @echo " run-vat - run vpp-api-test tool"
256 @echo " pkg-deb - build DEB packages"
257 @echo " pkg-deb-debug - build DEB debug packages"
258 @echo " pkg-snap - build SNAP package"
259 @echo " snap-clean - clean up snap build environment"
260 @echo " pkg-rpm - build RPM packages"
261 @echo " install-ext-dep[s] - install external development dependencies"
262 @echo " ctags - (re)generate ctags database"
263 @echo " gtags - (re)generate gtags database"
264 @echo " cscope - (re)generate cscope database"
265 @echo " compdb - (re)generate compile_commands.json"
266 @echo " checkstyle - check coding style"
267 @echo " checkstyle-commit - check commit message format"
268 @echo " checkstyle-python - check python coding style using 'black' formatter"
269 @echo " checkstyle-api - check api for incompatible changes"
270 @echo " fixstyle - fix coding style"
271 @echo " fixstyle-python - fix python coding style using 'black' formatter"
272 @echo " doxygen - DEPRECATED - use 'make docs'"
273 @echo " bootstrap-doxygen - DEPRECATED"
274 @echo " wipe-doxygen - DEPRECATED"
275 @echo " checkfeaturelist - check FEATURE.yaml according to schema"
276 @echo " featurelist - dump feature list in markdown"
277 @echo " json-api-files - (re)-generate json api files"
278 @echo " json-api-files-debug - (re)-generate json api files for debug target"
279 @echo " go-api-files - (re)-generate golang api files"
280 @echo " docs - Build the Sphinx documentation"
281 @echo " docs-venv - Build the virtual environment for the Sphinx docs"
282 @echo " docs-clean - Remove the generated files from the Sphinx docs"
283 @echo " docs-rebuild - Rebuild all of the Sphinx documentation"
285 @echo "Make Arguments:"
286 @echo " V=[0|1] - set build verbosity level"
287 @echo " STARTUP_CONF=<path> - startup configuration file"
288 @echo " (e.g. /etc/vpp/startup.conf)"
289 @echo " STARTUP_DIR=<path> - startup directory (e.g. /etc/vpp)"
290 @echo " It also sets STARTUP_CONF if"
291 @echo " startup.conf file is present"
292 @echo " GDB=<path> - gdb binary to use for debugging"
293 @echo " PLATFORM=<name> - target platform. default is vpp"
294 @echo " DPDK_CONFIG=<conf> - add specified dpdk config commands to"
295 @echo " autogenerated startup.conf"
296 @echo " (e.g. \"no-pci\" )"
297 @echo " SAMPLE_PLUGIN=yes - in addition build/run/debug sample plugin"
298 @echo " DISABLED_PLUGINS=<list> - comma separated list of plugins which"
299 @echo " should not be loaded"
301 @echo "Current Argument Values:"
303 @echo " STARTUP_CONF = $(STARTUP_CONF)"
304 @echo " STARTUP_DIR = $(STARTUP_DIR)"
305 @echo " GDB = $(GDB)"
306 @echo " PLATFORM = $(PLATFORM)"
307 @echo " DPDK_VERSION = $(DPDK_VERSION)"
308 @echo " DPDK_CONFIG = $(DPDK_CONFIG)"
309 @echo " SAMPLE_PLUGIN = $(SAMPLE_PLUGIN)"
310 @echo " DISABLED_PLUGINS = $(DISABLED_PLUGINS)"
313 ifeq ($(findstring y,$(UNATTENDED)),y)
316 ifeq ($(filter ubuntu debian linuxmint,$(OS_ID)),$(OS_ID))
317 @MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \
318 if [ -n "$$MISSING" ] ; then \
319 echo "\nPlease install missing packages: \n$$MISSING\n" ; \
320 echo "by executing \"make install-dep\"\n" ; \
324 else ifneq ("$(wildcard /etc/redhat-release)","")
325 @for i in $(RPM_DEPENDS) ; do \
326 RPM=$$(basename -s .rpm "$${i##*/}" | cut -d- -f1,2,3,4) ; \
327 MISSING+=$$(rpm -q $$RPM | grep "^package") ; \
329 if [ -n "$$MISSING" ] ; then \
330 echo "Please install missing RPMs: \n$$MISSING\n" ; \
331 echo "by executing \"make install-dep\"\n" ; \
340 @echo "'make bootstrap' is not needed anymore"
344 ifeq ($(filter ubuntu debian linuxmint,$(OS_ID)),$(OS_ID))
345 @sudo -E apt-get update
346 @sudo -E apt-get $(APT_ARGS) $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
347 else ifneq ("$(wildcard /etc/redhat-release)","")
349 @sudo -E yum-config-manager --enable rhel-server-rhscl-7-rpms
350 @sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
351 @sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
352 @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs zlib
353 else ifeq ($(OS_ID),rocky)
354 @sudo -E dnf install $(CONFIRM) dnf-plugins-core epel-release
355 @sudo -E dnf config-manager --set-enabled \
356 $(shell dnf repolist all 2>/dev/null|grep -i crb|cut -d' ' -f1|grep -v source)
357 @sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
358 @sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
359 else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
360 @sudo -E dnf install $(CONFIRM) dnf-plugins-core epel-release
361 @sudo -E dnf config-manager --set-enabled \
362 $(shell dnf repolist all 2>/dev/null|grep -i powertools|cut -d' ' -f1|grep -v source)
363 @sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
364 @sudo -E dnf install --skip-broken $(CONFIRM) $(RPM_DEPENDS)
365 else ifeq ($(OS_ID),centos)
366 @sudo -E yum install $(CONFIRM) centos-release-scl-rh epel-release
367 @sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
368 @sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
369 @sudo -E yum install $(CONFIRM) --enablerepo=base-debuginfo $(RPM_DEPENDS_DEBUG)
370 else ifeq ($(OS_ID),fedora)
371 @sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
372 @sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
373 @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs zlib
375 else ifeq ($(filter opensuse-leap-15.3 opensuse-leap-15.4 ,$(OS_ID)-$(OS_VERSION_ID)),$(OS_ID)-$(OS_VERSION_ID))
376 @sudo -E zypper refresh
377 @sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
379 $(error "This option currently works only on Ubuntu, Debian, RHEL, CentOS or openSUSE-leap systems")
381 git config commit.template .git_commit_template.txt
384 install-deps: install-dep
387 @$(MAKE) -C $(BR) PLATFORM=$(PLATFORM) TAG=$(1) $(2)
390 $(BR)/scripts/.version:
391 ifneq ("$(wildcard /etc/redhat-release)","")
392 $(shell $(BR)/scripts/version rpm-string > $(BR)/scripts/.version)
394 $(shell $(BR)/scripts/version > $(BR)/scripts/.version)
397 DIST_FILE = $(BR)/vpp-$(shell src/scripts/version).tar
398 DIST_SUBDIR = vpp-$(shell src/scripts/version|cut -f1 -d-)
402 @if git rev-parse 2> /dev/null ; then \
404 --prefix=$(DIST_SUBDIR)/ \
408 git describe --long > $(BR)/.version ; \
410 (cd .. ; tar -cf $(DIST_FILE) $(DIST_SUBDIR) --exclude=*.tar) ; \
411 src/scripts/version > $(BR)/.version ; \
414 --file $(DIST_FILE) \
415 --transform='s,.*/.version,$(DIST_SUBDIR)/src/scripts/.version,' \
417 @$(RM) $(BR)/.version $(DIST_FILE).xz
418 @xz -v --threads=0 $(DIST_FILE)
419 @$(RM) $(BR)/vpp-latest.tar.xz
420 @ln -rs $(DIST_FILE).xz $(BR)/vpp-latest.tar.xz
423 build: $(BR)/.deps.ok
424 $(call make,$(PLATFORM)_debug,$(addsuffix -install,$(TARGETS)))
428 @$(RM) $(BR)/*.tar.xz
431 wipe: wipedist test-wipe $(BR)/.deps.ok
432 $(call make,$(PLATFORM)_debug,$(addsuffix -wipe,$(TARGETS)))
433 @find . -type f -name "*.api.json" ! -path "./src/*" -exec rm {} \;
438 .PHONY: build-release
439 build-release: $(BR)/.deps.ok
440 $(call make,$(PLATFORM),$(addsuffix -install,$(TARGETS)))
443 wipe-release: test-wipe $(BR)/.deps.ok
444 $(call make,$(PLATFORM),$(addsuffix -wipe,$(TARGETS)))
446 .PHONY: rebuild-release
447 rebuild-release: wipe-release build-release
449 export TEST_DIR ?= $(WS_ROOT)/test
452 $(if $(filter-out $(2),retest),$(MAKE) -C $(BR) PLATFORM=vpp TAG=$(1) CC=$(CC) vpp-install,)
453 $(eval libs:=lib lib64)
455 VPP_BUILD_DIR=$(BR)/build-$(1)-native/vpp \
456 VPP_BIN=$(BR)/install-$(1)-native/vpp/bin/vpp \
457 VPP_INSTALL_PATH=$(BR)/install-$(1)-native/ \
458 EXTENDED_TESTS=$(EXTENDED_TESTS) \
459 TEST_GCOV=$(TEST_GCOV) \
462 RND_SEED=$(RND_SEED) \
463 CACHE_OUTPUT=$(CACHE_OUTPUT) \
473 $(call test,vpp,test)
480 $(call test,vpp_debug,test)
486 $(call test,vpp_gcov,cov)
488 .PHONY: test-cov-build
492 $(call test,vpp_gcov,test)
494 .PHONY: test-cov-prep
497 $(call test,vpp_gcov,cov-prep)
499 .PHONY: test-cov-post
502 $(call test,vpp_gcov,cov-post)
506 $(eval EXTENDED_TESTS=1)
507 $(call test,vpp,test)
509 .PHONY: test-all-debug
511 $(eval EXTENDED_TESTS=1)
512 $(call test,vpp_debug,test)
518 $(eval EXTENDED_TESTS=1)
519 $(call test,vpp_gcov,test)
522 papi-wipe: test-wipe-papi
523 $(call banner,"This command is deprecated. Please use 'test-wipe-papi'")
525 .PHONY: test-wipe-papi
527 @$(MAKE) -C test wipe-papi
531 @$(MAKE) -C test help
535 @$(MAKE) -C test wipe
539 $(call test,vpp,shell)
541 .PHONY: test-shell-debug
543 $(call test,vpp_debug,shell)
545 .PHONY: test-shell-cov
549 $(call test,vpp_gcov,shell)
553 @make -C test test-dep
557 @echo "make test-doc is DEPRECATED: use 'make docs'"
560 .PHONY: test-wipe-doc
562 @echo "make test-wipe-doc is DEPRECATED"
565 .PHONY: test-wipe-cov
567 $(call make,$(PLATFORM)_gcov,$(addsuffix -wipe,$(TARGETS)))
568 @$(MAKE) -C test wipe-cov
570 .PHONY: test-wipe-all
572 @$(MAKE) -C test wipe-all
574 # Note: All python venv consolidated in test/Makefile, test/requirements*.txt
575 .PHONY: test-checkstyle
577 $(warning test-checkstyle is deprecated. Running checkstyle-python.")
578 @$(MAKE) -C test checkstyle-python-all
580 # Note: All python venv consolidated in test/Makefile, test/requirements*.txt
581 .PHONY: test-checkstyle-diff
582 test-checkstyle-diff:
583 $(warning test-checkstyle-diff is deprecated. Running checkstyle-python.")
584 @$(MAKE) -C test checkstyle-python-all
586 .PHONY: test-refresh-deps
588 @$(MAKE) -C test refresh-deps
592 $(call test,vpp,retest)
596 $(call test,vpp_debug,retest)
600 $(eval EXTENDED_TESTS=1)
601 $(call test,vpp,retest)
603 .PHONY: retest-all-debug
605 $(eval EXTENDED_TESTS=1)
606 $(call test,vpp_debug,retest)
608 .PHONY: test-start-vpp-in-gdb
609 test-start-vpp-in-gdb:
610 $(call test,vpp,start-gdb)
612 .PHONY: test-start-vpp-debug-in-gdb
613 test-start-vpp-debug-in-gdb:
614 $(call test,vpp_debug,start-gdb)
616 ifeq ("$(wildcard $(STARTUP_CONF))","")
618 @echo "WARNING: STARTUP_CONF not defined or file doesn't exist."
619 @echo " Running with minimal startup config: $(MINIMAL_STARTUP_CONF)\n"
620 @cd $(STARTUP_DIR) && \
621 $(SUDO) $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF)
625 @cd $(STARTUP_DIR) && \
626 $(SUDO) $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//')
631 @find src -name '*.[chS]' > $@
637 $(call run, $(BR)/install-$(PLATFORM)_debug-native)
641 $(call run, $(BR)/install-$(PLATFORM)-native)
645 $(call run, $(BR)/install-$(PLATFORM)_debug-native,$(GDB) $(GDB_ARGS) --args)
647 .PHONY: build-coverity
649 $(call make,$(PLATFORM)_coverity,install-packages)
650 @$(MAKE) -C build-root PLATFORM=vpp TAG=vpp_coverity libmemif-install
652 .PHONY: debug-release
654 $(call run, $(BR)/install-$(PLATFORM)-native,$(GDB) $(GDB_ARGS) --args)
658 $(call make,$(PLATFORM)_debug,vpp-api-test-install)
662 @$(SUDO) $(BR)/install-$(PLATFORM)_debug-native/vpp/bin/vpp_api_test
666 $(call make,$(PLATFORM),vpp-package-deb)
672 SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=8G \
673 SNAPCRAFT_BUILD_ENVIRONMENT_CPU=6 \
682 .PHONY: pkg-deb-debug
684 $(call make,$(PLATFORM)_debug,vpp-package-deb)
688 $(MAKE) -C extras/rpm
692 $(MAKE) -C extras/rpm srpm
694 .PHONY: install-ext-deps
696 $(MAKE) -C build/external install-$(PKG)
698 .PHONY: install-ext-dep
699 install-ext-dep: install-ext-deps
701 .PHONY: json-api-files
703 $(WS_ROOT)/src/tools/vppapigen/generate_json.py
705 .PHONY: json-api-files-debug
706 json-api-files-debug:
707 $(WS_ROOT)/src/tools/vppapigen/generate_json.py --debug-target
710 go-api-files: json-api-files
711 $(WS_ROOT)/src/tools/vppapigen/generate_go.py $(ARGS)
715 @ctags --totals --tag-relative=yes -L $<
720 @gtags --gtagslabel=ctags
728 @ninja -C build-root/build-vpp_debug-native/vpp build.ninja
729 @ninja -C build-root/build-vpp_debug-native/vpp -t compdb | \
730 src/scripts/compdb_cleanup.py > compile_commands.json
733 checkstyle: checkfeaturelist
734 @extras/scripts/checkstyle.sh
736 .PHONY: checkstyle-commit
738 @extras/scripts/check_commit_msg.sh
740 .PHONY: checkstyle-test
742 $(warning test-checkstyle is deprecated. Running checkstyle-python.")
743 @$(MAKE) -C test checkstyle-python-all
745 # Note: All python venv consolidated in test/Makefile, test/requirements*.txt
746 .PHONY: checkstyle-python
748 @$(MAKE) -C test checkstyle-python-all
750 .PHONY: checkstyle-all
751 checkstyle-all: checkstyle-commit checkstyle checkstyle-python docs-spell
755 @extras/scripts/checkstyle.sh --fix
757 # Note: All python venv consolidated in test/Makefile, test/requirements*.txt
758 .PHONY: fixstyle-python
760 @$(MAKE) -C test fixstyle-python-all
762 .PHONY: checkstyle-api
764 @extras/scripts/crcchecker.py --check-patchset
766 # necessary because Bug 1696324 - Update to python3.6 breaks PyYAML dependencies
767 # Status: CLOSED CANTFIX
768 # https://bugzilla.redhat.com/show_bug.cgi?id=1696324
769 .PHONY: centos-pyyaml
771 ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
772 @sudo -E yum install $(CONFIRM) python3-pyyaml
776 featurelist: centos-pyyaml
777 @extras/scripts/fts.py --all --markdown
779 .PHONY: checkfeaturelist
780 checkfeaturelist: centos-pyyaml
781 @extras/scripts/fts.py --validate --all
784 # Build the documentation
787 .PHONY: bootstrap-doxygen
789 @echo "make bootstrap-doxygen is DEPRECATED"
794 @echo "make doxygen is DEPRECATED: use 'make docs'"
799 @echo "make wipe-doxygen is DEPRECATED"
804 @$(MAKE) -C $(WS_ROOT)/docs $*
808 @$(MAKE) -C $(WS_ROOT)/docs docs
811 pkg-verify: install-dep $(BR)/.deps.ok install-ext-deps
812 $(call banner,"Building for PLATFORM=vpp")
813 @$(MAKE) -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages
814 $(call banner,"Building sample-plugin")
815 @$(MAKE) -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install
816 $(call banner,"Building libmemif")
817 @$(MAKE) -C build-root PLATFORM=vpp TAG=vpp libmemif-install
818 $(call banner,"Building $(PKG) packages")
821 # Note: 'make verify' target is not used by ci-management scripts
822 MAKE_VERIFY_GATE_OS ?= ubuntu-22.04
825 ifeq ($(OS_ID)-$(OS_VERSION_ID),$(MAKE_VERIFY_GATE_OS))
826 $(call banner,"Testing vppapigen")
827 @src/tools/vppapigen/test_vppapigen.py
828 $(call banner,"Running tests")
829 @$(MAKE) COMPRESS_FAILED_TEST_LOGS=yes RETRIES=3 test
831 $(call banner,"Skipping tests. Tests under 'make verify' supported on $(MAKE_VERIFY_GATE_OS)")
834 .PHONY: check-dpdk-mlx
836 @[ $$($(MAKE) -sC build/external dpdk-show-DPDK_MLX_DEFAULT) = y ]