File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1- SHELL =/bin/bash
21SED ?= sed
32
43# Note: Individual rules that use RISCV or external tools perform local checks to avoid
54# blocking unrelated targets. Use $(require_riscv) and $(call require_cmd,<tool>) inside recipes.
65
6+
77define require_riscv
88 @if [ -z "$(RISCV ) " ]; then \
99 echo "RISCV is unset. Source env.sh (which activates the default conda env) before building sims." 1>&2; \
Original file line number Diff line number Diff line change 1+ # Ensure GNU Make uses a modern bash for recipes
2+ # - Set early (before other includes) so old make versions honor it.
3+ # - Prefer Homebrew or /usr/local bash, else fall back to /bin/bash.
4+ SHELL := $(shell \
5+ if [ -x /opt/homebrew/bin/bash ]; then printf /opt/homebrew/bin/bash; \
6+ elif [ -x /usr/local/bin/bash ]; then printf /usr/local/bin/bash; \
7+ elif command -v bash >/dev/null 2>&1; then command -v bash; \
8+ else printf /bin/bash; fi)
9+
110# ########################################################################################
211# makefile variables shared across multiple makefiles
312# - to use the help text, your Makefile should have a 'help' target that just
You can’t perform that action at this time.
0 commit comments