The-OpenROAD-Project / OpenROAD-flow-scripts

OpenROAD's scripts implementing an RTL-to-GDS Flow. Documentation at https://openroad-flow-scripts.readthedocs.io/en/latest/
https://theopenroadproject.org/
Other
282 stars 262 forks source link

makefile: fix empty bash command when user doesn't have klayout #2010

Open kamilrakoczy opened 1 month ago

kamilrakoczy commented 1 month ago

This PR fixes checking for KLAYOUT_VERSION when KLAYOUT_CMD is missing.

Currently Makefile always tries to check for KLAYOUT_VERSION but when KLAYOUT_CMD variable is empty it tries to execute invalid command and produces following error:

bash: - : invalid option
Usage:    bash [GNU long option] [option] ...
  bash [GNU long option] [option] script-file ...
GNU long options:
 --debug
 --debugger
 --dump-po-strings
 --dump-strings
 --help
 --init-file
 --login
 --noediting
 --noprofile
 --norc
 --posix
 --pretty-print
 --rcfile
 --restricted
 --verbose
 --version
Shell options:
 -ilrsD or -c command or -O shopt_option         (invocation only)
 -abefhkmnptuvxBCHP or -o option