docs: fix missing quotes in ubuntu install instructions
[vpp.git] / Makefile
index 3bdba65..1f37a7c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@
 export WS_ROOT=$(CURDIR)
 export BR=$(WS_ROOT)/build-root
 CCACHE_DIR?=$(BR)/.ccache
+SHELL:=/bin/bash
 GDB?=gdb
 PLATFORM?=vpp
 SAMPLE_PLUGIN?=no
@@ -64,7 +65,7 @@ endif
 DEB_DEPENDS  = curl build-essential autoconf automake ccache
 DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-systemd dh-python
 DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
-DEB_DEPENDS += lcov chrpath autoconf indent clang-format libnuma-dev
+DEB_DEPENDS += lcov chrpath autoconf libnuma-dev
 DEB_DEPENDS += python3-all python3-setuptools check
 DEB_DEPENDS += libboost-all-dev libffi-dev python3-ply libmbedtls-dev
 DEB_DEPENDS += cmake ninja-build uuid-dev python3-jsonschema python3-yaml
@@ -77,11 +78,12 @@ LIBFFI=libffi6 # works on all but 20.04 and debian-testing
 ifeq ($(OS_VERSION_ID),18.04)
        DEB_DEPENDS += python-dev python-all python-pip python-virtualenv
        DEB_DEPENDS += libssl-dev
-       DEB_DEPENDS += clang-9
+       DEB_DEPENDS += clang-9 clang-format-10
 else ifeq ($(OS_VERSION_ID),20.04)
        DEB_DEPENDS += python3-virtualenv
        DEB_DEPENDS += libssl-dev
        DEB_DEPENDS += libelf-dev # for libbpf (af_xdp)
+       DEB_DEPENDS += clang-format-10
        LIBFFI=libffi7
 else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-9)
        DEB_DEPENDS += libssl1.0-dev
@@ -284,7 +286,8 @@ ifeq ($(OS_ID),rhel)
        @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
 else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
        @sudo -E dnf install $(CONFIRM) dnf-plugins-core epel-release
-       @sudo -E dnf config-manager --set-enabled PowerTools
+       @sudo -E dnf config-manager --set-enabled \
+          $(shell dnf repolist all 2>/dev/null|grep -i powertools|cut -d' ' -f1)
        @sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
        @sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
 else ifeq ($(OS_ID),centos)
@@ -593,7 +596,7 @@ json-api-files-debug:
 
 .PHONY: ctags
 ctags: ctags.files
-       @ctags --totals --tag-relative -L $<
+       @ctags --totals --tag-relative=yes -L $<
        @rm $<
 
 .PHONY: gtags
@@ -606,11 +609,16 @@ cscope: cscope.files
 
 .PHONY: compdb
 compdb:
-       @ninja -C build-root/build-vpp_debug-native/vpp -t compdb > compile_commands.json
+       @ninja -C build-root/build-vpp_debug-native/vpp build.ninja
+       @ninja -C build-root/build-vpp_debug-native/vpp -t compdb | \
+         extras/scripts/compdb_cleanup.py > compile_commands.json
 
 .PHONY: checkstyle
 checkstyle: checkfeaturelist
-       @build-root/scripts/checkstyle.sh
+ifeq ($(shell which clang-format-10),)
+       @sudo apt-get install -y clang-format-10
+endif
+       @extras/scripts/checkstyle.sh
 
 .PHONY: checkstyle-commit
 checkstyle-commit:
@@ -624,7 +632,7 @@ checkstyle-all: checkstyle-commit checkstyle checkstyle-test
 
 .PHONY: fixstyle
 fixstyle:
-       @build-root/scripts/checkstyle.sh --fix
+       @extras/scripts/checkstyle.sh --fix
 
 .PHONY: checkstyle-api
 checkstyle-api:
@@ -635,9 +643,6 @@ checkstyle-api:
 # https://bugzilla.redhat.com/show_bug.cgi?id=1696324
 .PHONY: centos-pyyaml
 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