Open mithro opened 11 months ago
FWIW the version of bash I have installed is;
GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Looks like running make bash
produces the same output.
Installing klayout seems to make the bash error output go away....
I think I understand what is going on now, KLAYOUT_CMD ?= $(shell command -v klayout)
ends up with KLAYOUT_CMD
being a value which does not fail the following;
KLAYOUT_FOUND = $(if $(KLAYOUT_CMD),,$(error KLayout not found in PATH))
Then later on there are;
KLAYOUT_VERSION = $(shell $(KLAYOUT_CMD) -v 2>/dev/null | grep 'KLayout' | cut -d ' ' -f2)
Which ends up evaluating to something like $(shell -v 2>/dev/null | grep 'KLayout' | cut -d ' ' -f2)
?
diff --git a/flow/Makefile b/flow/Makefile
index 9dd3353d..9cce8761 100644
--- a/flow/Makefile
+++ b/flow/Makefile
@@ -295,7 +295,10 @@ KLAYOUT_CMD ?= sh -c 'LD_LIBRARY_PATH=$(dir $(KLAYOUT_BIN_FROM_DIR)) $$0 "$$@"'
else
KLAYOUT_CMD ?= $(shell command -v klayout)
endif
-KLAYOUT_FOUND = $(if $(KLAYOUT_CMD),,$(error KLayout not found in PATH))
+
+ifeq ($(KLAYOUT_CMD),)
+$(error KLayout not found in PATH))
+endif
ifneq ($(shell command -v stdbuf),)
STDBUF_CMD = stdbuf -o L
Makes the flow output the following;
tansell@tansell-glapstation:~/github/The-OpenROAD-Project/OpenROAD-flow-scripts/flow$ make bash
[INFO][FLOW] Using platform directory /home/tansell/github/The-OpenROAD-Project/OpenROAD-flow-scripts/flow/platforms/nangate45
Makefile:300: *** KLayout not found in PATH. Stop.
Subject
[Flow] for any util, flow Makefile, or flow script issues.
Describe the bug
When running
make DESIGN_CONFIG=./designs/nangate45/swerv/config.mk
I get output aboutbash: - : invalid option
, see the following output;Expected Behavior
No errors from bash.
Environment