@@ -70,15 +70,16 @@ export NUM_CORES
7070
7171# -------------------------------------------------------------------------------
7272# setup all commands used within this flow
73- export PYTHON_EXE ?= $(shell command -v python3)
73+ PYTHON_EXE ?= $(shell command -v python3)
74+ export PYTHON_EXE := $(PYTHON_EXE )
7475
7576export TIME_BIN ?= env time
7677TIME_CMD = $(TIME_BIN ) -f 'Elapsed time: %E[h:]min:sec. CPU time: user %U sys %S (%P). Peak memory: %MKB.'
7778TIME_TEST = $(shell $(TIME_CMD ) echo foo 2>/dev/null)
7879ifeq (,$(strip $(TIME_TEST ) ) )
7980 TIME_CMD = $(TIME_BIN )
8081endif
81- export TIME_CMD
82+ export TIME_CMD := $( TIME_CMD )
8283
8384# The following determine the executable location for each tool used by this flow.
8485# Priority is given to
@@ -87,16 +88,19 @@ export TIME_CMD
8788# 2.1 if in Nix shell: openroad, yosys from the environment
8889# 2.2 ORFS compiled tools: openroad, yosys
8990ifneq (${IN_NIX_SHELL},)
90- export OPENROAD_EXE ?= $(shell command -v openroad)
91+ OPENROAD_EXE ?= $(shell command -v openroad)
9192else
92- export OPENROAD_EXE ?= $(abspath $(FLOW_HOME ) /../tools/install/OpenROAD/bin/openroad)
93+ OPENROAD_EXE ?= $(abspath $(FLOW_HOME ) /../tools/install/OpenROAD/bin/openroad)
9394endif
9495ifneq (${IN_NIX_SHELL},)
95- export OPENSTA_EXE ?= $(shell command -v sta)
96+ OPENSTA_EXE ?= $(shell command -v sta)
9697else
97- export OPENSTA_EXE ?= $(abspath $(FLOW_HOME ) /../tools/install/OpenROAD/bin/sta)
98+ OPENSTA_EXE ?= $(abspath $(FLOW_HOME ) /../tools/install/OpenROAD/bin/sta)
9899endif
99100
101+ export OPENROAD_EXE := $(OPENROAD_EXE )
102+ export OPENSTA_EXE := $(OPENSTA_EXE )
103+
100104OPENROAD_IS_VALID := $(if $(OPENROAD_EXE ) ,$(shell test -x $(OPENROAD_EXE ) && echo "true") ,)
101105
102106export OPENROAD_ARGS = -no_init -threads $(NUM_CORES ) $(OR_ARGS )
@@ -109,7 +113,8 @@ ifneq (${IN_NIX_SHELL},)
109113else
110114 YOSYS_EXE ?= $(abspath $(FLOW_HOME ) /../tools/install/yosys/bin/yosys)
111115endif
112- export YOSYS_EXE
116+
117+ export YOSYS_EXE := $(YOSYS_EXE )
113118
114119YOSYS_IS_VALID := $(if $(YOSYS_EXE ) ,$(shell test -x $(YOSYS_EXE ) && echo "true") ,)
115120
@@ -118,13 +123,15 @@ KLAYOUT_DIR = $(abspath $(FLOW_HOME)/../tools/install/klayout/)
118123KLAYOUT_BIN_FROM_DIR = $(KLAYOUT_DIR ) /klayout
119124
120125ifeq ($(wildcard $(KLAYOUT_BIN_FROM_DIR ) ) , $(KLAYOUT_BIN_FROM_DIR ) )
121- export KLAYOUT_CMD ?= sh -c 'LD_LIBRARY_PATH=$(dir $(KLAYOUT_BIN_FROM_DIR ) ) $$0 "$$@ "' $(KLAYOUT_BIN_FROM_DIR )
126+ KLAYOUT_CMD ?= sh -c 'LD_LIBRARY_PATH=$(dir $(KLAYOUT_BIN_FROM_DIR ) ) $$0 "$$@ "' $(KLAYOUT_BIN_FROM_DIR )
122127else
123128ifeq ($(KLAYOUT_CMD ) ,)
124- export KLAYOUT_CMD : = $(shell command -v klayout)
129+ KLAYOUT_CMD ? = $(shell command -v klayout)
125130endif
126131endif
127132
133+ export KLAYOUT_CMD := $(KLAYOUT_CMD )
134+
128135ifneq ($(shell command -v stdbuf) ,)
129136 STDBUF_CMD ?= stdbuf -o L
130137endif
0 commit comments