summaryrefslogtreecommitdiffstats
path: root/build-root/Makefile
diff options
context:
space:
mode:
authorTom Jones <thj@freebsd.org>2024-01-18 14:51:44 +0000
committerDamjan Marion <dmarion@0xa5.net>2024-01-19 12:30:01 +0000
commitc3b416c49253bcf3223d2aec8c5ca06f0c78e6f9 (patch)
tree9502543d041b75820d2137cffe00c74978c7561c /build-root/Makefile
parentca75cd83b51895e94326117cf116c5d25e6c77da (diff)
build: Explicitly use bash for shell scripts
VPP requires bash for all shell scripts. Align shebang lines in build and test scripts to look up the location of bash rather than hard coding '/bin/bash'. Look up the location of bash for makefiles. Type: improvement Change-Id: I23b705d81d60389fa8af61c680cf0abd74f0ea24 Signed-off-by: Tom Jones <thj@freebsd.org>
Diffstat (limited to 'build-root/Makefile')
-rw-r--r--build-root/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/build-root/Makefile b/build-root/Makefile
index d35b7a10aeb..6416de27336 100644
--- a/build-root/Makefile
+++ b/build-root/Makefile
@@ -39,7 +39,7 @@
######################################################################
# Scripts require non-POSIX parts of bash
-SHELL := /bin/bash
+SHELL := $(shell which bash)
# Where this makefile lives
MU_BUILD_ROOT_DIR = $(shell pwd)
@@ -962,7 +962,7 @@ $(PLATFORM_IMAGE_DIR)/ro.img ro-image: $(patsubst %,%-find-source,$(ROOT_PACKAGE
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
- fakeroot /bin/bash -c "{ \
+ fakeroot $(SHELL) -c "{ \
set -eu$(BUILD_DEBUG) ; \
$(MAKE) -C $(MU_BUILD_ROOT_DIR) IMAGE_INSTALL_DIR=$${tmp_dir} \
$(patsubst %,%-image_install, \
@@ -1054,7 +1054,7 @@ rw-image: rw-image-check-type ro-image
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
- fakeroot /bin/bash -c "{ \
+ fakeroot $(SHELL) -c "{ \
set -eu$(BUILD_DEBUG) ; \
$(linuxrc_makedev) ; \
$(call rw_image_embed_ro_image_fn,$${ro_image}) ; \