Changes from Donn to enhance the configuration script to allow specific tools to be enabled or disabled for setup installation.
diff --git a/.gitignore b/.gitignore index 04e839b..0cb02a5 100644 --- a/.gitignore +++ b/.gitignore
@@ -14,6 +14,8 @@ scripts/* !scripts/configure !scripts/configure.ac +!scripts/tools.txt +!scripts/rl **/Makefile **/Makefile.am
diff --git a/VERSION b/VERSION index 87903b6..00572ce 100644 --- a/VERSION +++ b/VERSION
@@ -1 +1 @@ -1.0.93 +1.0.94
diff --git a/scripts/configure b/scripts/configure index 235b881..5841a66 100755 --- a/scripts/configure +++ b/scripts/configure
@@ -597,6 +597,11 @@ PYTHON_PREFIX PYTHON_VERSION PYTHON +QFLOW_DISABLED +OPENLANE_DISABLED +NETGEN_DISABLED +MAGIC_DISABLED +KLAYOUT_DISABLED SKY130_LINK_TARGETS SKY130_DIST_PATH SKY130_LOCAL_PATH @@ -646,6 +651,11 @@ with_sky130_local_path with_sky130_dist_path with_sky130_link_targets +enable_klayout +enable_magic +enable_netgen +enable_openlane +enable_qflow with_ef_style ' ac_precious_vars='build_alias @@ -1257,6 +1267,21 @@ esac cat <<\_ACEOF +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-klayout --disable-klayout + Enable or disable klayout [default=enabled] + --enable-magic --disable-magic + Enable or disable magic [default=enabled] + --enable-netgen --disable-netgen + Enable or disable netgen [default=enabled] + --enable-openlane --disable-openlane + Enable or disable openlane [default=enabled] + --enable-qflow --disable-qflow + Enable or disable qflow [default=enabled] + Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) @@ -1711,6 +1736,10 @@ # detect PDKs based on directories that include Makefile.in files +# define tools to install setup files for. This does not imply that the tools are +# available on the system; just that open_pdks will install the setup files for them. + + # check for the source and install paths for each PDK. @@ -1840,7 +1869,87 @@ + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: Tools enabled for PDK setup installation: klayout magic netgen openlane qflow" >&5 +$as_echo "$as_me: Tools enabled for PDK setup installation: klayout magic netgen openlane qflow" >&6;} + + + + + + KLAYOUT_DISABLED=0 + # Check whether --enable-klayout was given. +if test "${enable_klayout+set}" = set; then : + enableval=$enable_klayout; + if test "$enableval" == "no" -o "$enableval" == "NO"; then + KLAYOUT_DISABLED=1 + fi + +fi + + + + + + MAGIC_DISABLED=0 + # Check whether --enable-magic was given. +if test "${enable_magic+set}" = set; then : + enableval=$enable_magic; + if test "$enableval" == "no" -o "$enableval" == "NO"; then + MAGIC_DISABLED=1 + fi + +fi + + + + + + NETGEN_DISABLED=0 + # Check whether --enable-netgen was given. +if test "${enable_netgen+set}" = set; then : + enableval=$enable_netgen; + if test "$enableval" == "no" -o "$enableval" == "NO"; then + NETGEN_DISABLED=1 + fi + +fi + + + + + + OPENLANE_DISABLED=0 + # Check whether --enable-openlane was given. +if test "${enable_openlane+set}" = set; then : + enableval=$enable_openlane; + if test "$enableval" == "no" -o "$enableval" == "NO"; then + OPENLANE_DISABLED=1 + fi + +fi + + + + + + QFLOW_DISABLED=0 + # Check whether --enable-qflow was given. +if test "${enable_qflow+set}" = set; then : + enableval=$enable_qflow; + if test "$enableval" == "no" -o "$enableval" == "NO"; then + QFLOW_DISABLED=1 + fi + +fi + + + + + # Checking if (some) prerequisites are satisfied +## REQUIRES: https://www.gnu.org/software/autoconf-archive/ax_python_module.html#ax_python_module
diff --git a/scripts/configure.ac b/scripts/configure.ac index aacc866..b615f48 100755 --- a/scripts/configure.ac +++ b/scripts/configure.ac
@@ -3,6 +3,10 @@ # detect PDKs based on directories that include Makefile.in files m4_define([M4_GET_TECHS], [m4_normalize(m4_esyscmd(cd .. && find * -mindepth 1 -name "Makefile.in" -exec dirname {} \; | tr "\n" " "))]) +# define tools to install setup files for. This does not imply that the tools are +# available on the system; just that open_pdks will install the setup files for them. +m4_define([M4_GET_TOOLS], [m4_normalize(m4_esyscmd(cat ./tools.txt | tr "\n" " "))]) + # check for the source and install paths for each PDK. AC_DEFUN([M4_GEN_WITH_PDK_ARGS], [ @@ -93,7 +97,32 @@ M4_GEN_WITH_PDK_ARGS(M4_GET_TECHS()) +AC_DEFUN([M4_GEN_WITH_TOOLS], [ + m4_foreach_w(tool, $1, [ + m4_define([toolvar], [m4_normalize(m4_esyscmd(echo tool | tr "a-z" "A-Z"))]) + + toolvar[]_DISABLED=0 + AC_ARG_ENABLE(tool, + AS_HELP_STRING( + --enable-tool --disable-tool, + Enable or disable tool @<:@default=enabled@:>@ + ), + [ + if test "$enableval" == "no" -o "$enableval" == "NO"; then + toolvar[]_DISABLED=1 + fi + ], + ) + AC_SUBST(toolvar[]_DISABLED) + ]) +]) + +AC_MSG_NOTICE([Tools enabled for PDK setup installation: M4_GET_TOOLS()]) + +M4_GEN_WITH_TOOLS(M4_GET_TOOLS()) + # Checking if (some) prerequisites are satisfied +## REQUIRES: https://www.gnu.org/software/autoconf-archive/ax_python_module.html#ax_python_module AM_PATH_PYTHON([3.4]) AX_PYTHON_MODULE([distutils],[])
diff --git a/scripts/tools.txt b/scripts/tools.txt new file mode 100644 index 0000000..c679f92 --- /dev/null +++ b/scripts/tools.txt
@@ -0,0 +1,5 @@ +klayout +magic +netgen +openlane +qflow \ No newline at end of file
diff --git a/sky130/Makefile.in b/sky130/Makefile.in index a33c113..9092a37 100644 --- a/sky130/Makefile.in +++ b/sky130/Makefile.in
@@ -46,10 +46,6 @@ # cloned from https://github.com/google/skywater-pdk. This # option is mandatory and has no default. # -# -# NOTE: The comments below are for features that have not yet been -# implemented. -# # Enable/disable for specific libraries to be installed (and downloaded if # needed). Libraries that are part of the open_pdks repository are enabled # by default and must be disabled by passing an option to configure. Libraries @@ -73,6 +69,10 @@ # --disable-klayout # Do not install setup files for the klayout layout tool. # +# +# NOTE: The comments below are for features that have not yet been +# implemented. +# # External libraries and tool setups that can be enabled are the following: # # --enable-skywater-pdk[=<path>] @@ -132,7 +132,7 @@ MV = mv REVISION = `git describe --long` -TECH = sky130 +TECH = sky130 # If EF_STYLE is set to 1, then efabless naming conventions are # used, otherwise the generic naming conventions are used. @@ -263,7 +263,38 @@ ADDPROP = ../common/insert_property.py ${EF_FORMAT} # List the EDA tools to install local setup files for -TOOLS = magic qflow netgen klayout openlane +TOOLS = + +# KLAYOUT_DISABLED = 0 | 1 +KLAYOUT_DISABLED = @KLAYOUT_DISABLED@ +ifneq (${KLAYOUT_DISABLED}, 1) + TOOLS += klayout +endif + +# OPENLANE_DISABLED = 0 | 1 +OPENLANE_DISABLED = @OPENLANE_DISABLED@ +ifneq (${OPENLANE_DISABLED}, 1) + TOOLS += openlane +endif + +# QFLOW_DISABLED = 0 | 1 +QFLOW_DISABLED = @QFLOW_DISABLED@ +ifneq (${QFLOW_DISABLED}, 1) + TOOLS += qflow +endif + +# MAGIC_DISABLED = 0 | 1 +MAGIC_DISABLED = @MAGIC_DISABLED@ +ifneq (${MAGIC_DISABLED}, 1) + TOOLS += magic +endif + +# NETGEN_DISABLED = 0 | 1 +NETGEN_DISABLED = @NETGEN_DISABLED@ +ifneq (${NETGEN_DISABLED}, 1) + TOOLS += netgen +endif + all: all-a