File tree Expand file tree Collapse file tree 2 files changed +18
-15
lines changed
Expand file tree Collapse file tree 2 files changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -159,23 +159,8 @@ ifneq ($(BLOCKS),)
159159 endif
160160endif
161161
162- # Use locally installed and built klayout if it exists, otherwise use klayout in path
163- KLAYOUT_DIR = $(abspath $(FLOW_HOME ) /../tools/install/klayout/)
164- KLAYOUT_BIN_FROM_DIR = $(KLAYOUT_DIR ) /klayout
165-
166- ifeq ($(wildcard $(KLAYOUT_BIN_FROM_DIR ) ) , $(KLAYOUT_BIN_FROM_DIR ) )
167- KLAYOUT_CMD ?= sh -c 'LD_LIBRARY_PATH=$(dir $(KLAYOUT_BIN_FROM_DIR ) ) $$0 "$$@ "' $(KLAYOUT_BIN_FROM_DIR )
168- else
169- ifeq ($(KLAYOUT_CMD ) ,)
170- KLAYOUT_CMD := $(shell command -v klayout)
171- endif
172- endif
173162KLAYOUT_FOUND = $(if $(KLAYOUT_CMD ) ,,$(error KLayout not found in PATH) )
174163
175- ifneq ($(shell command -v stdbuf) ,)
176- STDBUF_CMD ?= stdbuf -o L
177- endif
178-
179164# -------------------------------------------------------------------------------
180165WRAPPED_LEFS = $(foreach lef,$(notdir $(WRAP_LEFS ) ) ,$(OBJECTS_DIR ) /lef/$(lef:.lef=_mod.lef ) )
181166WRAPPED_LIBS = $(foreach lib,$(notdir $(WRAP_LIBS ) ) ,$(OBJECTS_DIR ) /$(lib:.lib=_mod.lib ) )
Original file line number Diff line number Diff line change @@ -92,3 +92,21 @@ export OPENROAD_ARGS="-no_init -threads ${NUM_CORES} ${OR_ARGS}"
9292export OPENROAD_CMD=" ${OPENROAD_EXE} -exit ${OPENROAD_ARGS} "
9393export OPENROAD_NO_EXIT_CMD=" ${OPENROAD_EXE} ${OPENROAD_ARGS} "
9494export OPENROAD_GUI_CMD=" ${OPENROAD_EXE} -gui ${OR_ARGS} "
95+
96+ # Use locally installed and built klayout if it exists, otherwise use klayout in path
97+ KLAYOUT_DIR=" $( realpath " ${FLOW_HOME} /../tools/install/klayout/" ) "
98+ KLAYOUT_BIN_FROM_DIR=" ${KLAYOUT_DIR} /klayout"
99+
100+ if [[ -x " ${KLAYOUT_BIN_FROM_DIR} " ]]; then
101+ export KLAYOUT_CMD=" sh -c 'LD_LIBRARY_PATH=$( dirname " ${KLAYOUT_BIN_FROM_DIR} " ) \$ 0 \"\$ @\" ' ${KLAYOUT_BIN_FROM_DIR} "
102+ else
103+ if [[ -z " ${KLAYOUT_CMD:- } " ]]; then
104+ KLAYOUT_CMD=" $( command -v klayout || true) "
105+ fi
106+ fi
107+ export KLAYOUT_CMD
108+
109+ # Check if `stdbuf` is available and set STDBUF_CMD
110+ if command -v stdbuf & > /dev/null; then
111+ export STDBUF_CMD=" stdbuf -o L"
112+ fi
You can’t perform that action at this time.
0 commit comments