Skip to content

Commit

Permalink
Make more compatible with non-linux systems.
Browse files Browse the repository at this point in the history
* use /usr/bin/env to look for bash
* use pre-defined SHELL variable

Signed-off-by: Yuri Victorovich <yuri@FreeBSD.org>
  • Loading branch information
yurivict committed Dec 26, 2021
1 parent 8321c7f commit 545c8d5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build_openroad.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This script builds the OpenROAD Flow tools locally or in a Docker image.

# Exit on first error, do not allow unbound variables
Expand Down
2 changes: 1 addition & 1 deletion flow/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ endif

#-------------------------------------------------------------------------------
# Proper way to initiate SHELL for make
SHELL = /bin/bash
SHELL ?= /bin/bash
.SHELLFLAGS = -o pipefail -c

#-------------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion flow/platforms/sky130ram/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ endif
# Verbosity
OPTS += -v

export SHELL := /bin/bash
SHELL ?= /bin/bash
export SHELL
export SHELLOPTS := pipefail

%.ok: configs/%.py | $(OPENRAM_COMPILER) $(SKY130_FD_PR)
Expand Down
2 changes: 1 addition & 1 deletion flow/test/test_helper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eoux pipefail

Expand Down
2 changes: 1 addition & 1 deletion flow/util/utils.mk
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ RUN_ME_SCRIPT = run-me-$(DESIGN_NICKNAME)-$(PLATFORM)-$(FLOW_VARIANT).sh

$(foreach script,$(ISSUE_SCRIPTS),$(script)_issue): %_issue : versions.txt
# Creating $(RUN_ME_SCRIPT) script
@echo "#!/bin/bash" > $(RUN_ME_SCRIPT)
@echo "#!/usr/bin/env bash" > $(RUN_ME_SCRIPT)
@echo "source $(VARS_BASENAME).sh" >> $(RUN_ME_SCRIPT)
@echo "openroad -no_init $(SCRIPTS_DIR)/$*.tcl" >> $(RUN_ME_SCRIPT)
@chmod +x $(RUN_ME_SCRIPT)
Expand Down

0 comments on commit 545c8d5

Please sign in to comment.