Revised the top-level Makefile so that it does not need to declare
targets for each technology but will enumerate the valid technologies
discovered at the time of doing "autoconf" and the enabled
technologies declared by "configure". Also modified the "find"
command in the configure script to search symbolic links. This allows
additional target technologies to be added to the directory without
needing to update the top-level Makefile (although "autoconf" will
have to be re-run), and it allows new technologies to be added by
symbolically linking to the directory. This is important for non-free
technologies that cannot be distributed with open_pdks.
diff --git a/scripts/configure b/scripts/configure
index 4b226b2..7beeacc 100755
--- a/scripts/configure
+++ b/scripts/configure
@@ -587,6 +587,7 @@
ac_subst_vars='LTLIBOBJS
LIBOBJS
+ENABLED_TECHS
EF_STYLE
SKY130_OSU_T18_PATH
SKY130_OSU_T15_PATH
@@ -603,6 +604,7 @@
NETGEN_DISABLED
MAGIC_DISABLED
KLAYOUT_DISABLED
+ALL_TECHS
SKY130_SOURCE_PATH
SKY130_LINK_TARGETS
SED
@@ -2169,6 +2171,8 @@
python3 -c 'import os,sys;print(os.path.realpath(os.path.expanduser(sys.argv[1])))' $1
}
+ENABLED_TECHS=
+
# detect PDKs based on directories that include Makefile.in files
@@ -2200,10 +2204,12 @@
if test "$enableval" == "yes" -o "$enableval" == "YES"; then
export SKY130_SOURCE_PATH=../sources/sky130-pdk
SKY130_AUTO="1"
+ ENABLED_TECHS="$ENABLED_TECHS sky130"
elif test "$enableval" == "no" -o "$enableval" == "NO"; then
echo "Disabling sky130..."
else
SKY130_SOURCE_PATH=$enableval
+ ENABLED_TECHS="$ENABLED_TECHS sky130"
fi
fi
@@ -2271,6 +2277,10 @@
+# Export the list of known technologies to the Makefile
+ALL_TECHS="sky130"
+
+
# Set variables for tool setups
@@ -2750,8 +2760,10 @@
+# Export the list of enabled technologies to the Makefile
-MAKEFILES=$(find .. -name "Makefile.in" | sed 's/\(.*\)\.in/\1/g')
+
+MAKEFILES=$(find -L .. -name "Makefile.in" | sed 's/\(.*\)\.in/\1/g')
ac_config_files="$ac_config_files $MAKEFILES"
diff --git a/scripts/configure.ac b/scripts/configure.ac
index 0dbb30d..cfeef5a 100755
--- a/scripts/configure.ac
+++ b/scripts/configure.ac
@@ -20,8 +20,10 @@
python3 -c 'import os,sys;print(os.path.realpath(os.path.expanduser(sys.argv@<:@1@:>@)))' $1
}
+ENABLED_TECHS=
+
# detect PDKs based on directories that include Makefile.in files
-m4_define([M4_GET_TECHS], [m4_normalize(m4_esyscmd(cd .. && find * -mindepth 1 -maxdepth 1 -name "Makefile.in" -exec dirname {} \; | tr "\n" " "))])
+m4_define([M4_GET_TECHS], [m4_normalize(m4_esyscmd(cd .. && find -H * -mindepth 1 -maxdepth 1 -name "Makefile.in" -exec dirname {} \; | tr "\n" " "))])
# define tools
# define tools to install setup files for. This does not imply that the tools are
@@ -46,10 +48,12 @@
if test "$enableval" == "yes" -o "$enableval" == "YES"; then
export pdkvar[]_SOURCE_PATH=../sources/pdk-[pdk]
pdkvar[]_AUTO="1"
+ ENABLED_TECHS="$ENABLED_TECHS pdk"
elif test "$enableval" == "no" -o "$enableval" == "NO"; then
echo "Disabling pdk..."
else
pdkvar[]_SOURCE_PATH=$enableval
+ ENABLED_TECHS="$ENABLED_TECHS pdk"
fi
], [
]
@@ -92,6 +96,10 @@
M4_GEN_WITH_PDK_ARGS(M4_GET_TECHS())
+# Export the list of known technologies to the Makefile
+ALL_TECHS="M4_GET_TECHS()"
+AC_SUBST(ALL_TECHS)
+
# Set variables for tool setups
AC_DEFUN([M4_GEN_WITH_TOOLS], [
m4_foreach_w(tool, $1, [
@@ -249,8 +257,10 @@
)
AC_SUBST(EF_STYLE)
+# Export the list of enabled technologies to the Makefile
+AC_SUBST(ENABLED_TECHS)
-MAKEFILES=$(find .. -name "Makefile.in" | sed 's/\(.*\)\.in/\1/g')
+MAKEFILES=$(find -L .. -name "Makefile.in" | sed 's/\(.*\)\.in/\1/g')
AC_CONFIG_FILES($MAKEFILES)
AC_OUTPUT