build: Explicitly use bash for shell scripts
[vpp.git] / Makefile
index 98d1d41..d82a625 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@
 export WS_ROOT=$(CURDIR)
 export BR=$(WS_ROOT)/build-root
 CCACHE_DIR?=$(BR)/.ccache
-SHELL:=/bin/bash
+SHELL:=$(shell which bash)
 GDB?=gdb
 PLATFORM?=vpp
 SAMPLE_PLUGIN?=no
@@ -81,6 +81,7 @@ DEB_DEPENDS += iperf3 # for 'make test TEST=vcl'
 DEB_DEPENDS += nasm
 DEB_DEPENDS += iperf ethtool  # for 'make test TEST=vm_vpp_interfaces'
 DEB_DEPENDS += libpcap-dev
+DEB_DEPENDS += tshark
 
 LIBFFI=libffi6 # works on all but 20.04 and debian-testing
 
@@ -105,6 +106,12 @@ else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-11)
        DEB_DEPENDS += virtualenv
        DEB_DEPENDS += clang clang-format-11
        LIBFFI=libffi7
+else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-12)
+       DEB_DEPENDS += virtualenv
+       DEB_DEPENDS += clang-14 clang-format-14
+       # for extras/scripts/checkstyle.sh
+       export CLANG_FORMAT_VER=14
+       LIBFFI=libffi8
 else
        DEB_DEPENDS += clang-11 clang-format-11
        LIBFFI=libffi7
@@ -197,6 +204,7 @@ ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
 endif
 
 ifeq ($(findstring y,$(UNATTENDED)),y)
+DEBIAN_FRONTEND=noninteractive
 CONFIRM=-y
 FORCE=--allow-downgrades --allow-remove-essential --allow-change-held-packages
 endif
@@ -446,10 +454,16 @@ endef
 
 .PHONY: test
 test:
+ifeq ($(CC),cc)
+       $(eval CC=clang)
+endif
        $(call test,vpp,test)
 
 .PHONY: test-debug
 test-debug:
+ifeq ($(CC),cc)
+       $(eval CC=clang)
+endif
        $(call test,vpp_debug,test)
 
 .PHONY: test-cov