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/Makefile.in b/Makefile.in index 37de817..d78dafc 100644 --- a/Makefile.in +++ b/Makefile.in
@@ -39,19 +39,15 @@ # The following definitions are tied to the contents # of this repository and should not be changed. -TECHS = - -SKY130_SOURCE_PATH = @SKY130_SOURCE_PATH@ -ifneq ($(SKY130_SOURCE_PATH),) - TECHS += sky130 -endif +TECHS = @ALL_TECHS@ +ENABLED_TECHS = @ENABLED_TECHS@ DONE_MESSAGE = "Done." ifeq ($(TECHS),) DONE_MESSAGE = "No techs configured." endif -TECHS_ALL = $(addprefix tech_,$(TECHS)) +TECHS_ALL = $(addprefix tech-,$(TECHS)) TECHS_INSTALL = $(addprefix install-,$(TECHS)) TECHS_UNINSTALL = $(addprefix uninstall-,$(TECHS)) TECHS_CLEAN = $(addprefix clean-,$(TECHS)) @@ -59,6 +55,8 @@ #--------------------------------------------------- +.PHONY: all install uninstall clean veryclean + all: $(TECHS_ALL) @echo $(DONE_MESSAGE) @@ -113,21 +111,21 @@ #--------------------------------------------------- -tech_sky130: - (cd sky130 && ${MAKE} all) +tech-%: % + (cd $* && ${MAKE} all) #--------------------------------------------------- -install-sky130: sky130 - (cd sky130 && ${MAKE} install) +install-%: % + (cd $* && ${MAKE} install) -uninstall-sky130: sky130 - (cd sky130 && ${MAKE} uninstall) +uninstall-%: % + (cd $* && ${MAKE} uninstall) -clean-sky130: - (cd sky130 && ${MAKE} clean) +clean-%: + (cd $* && ${MAKE} clean) -veryclean-sky130: - (cd sky130 && ${MAKE} veryclean) +veryclean-%: + (cd $* && ${MAKE} veryclean) #---------------------------------------------------
diff --git a/VERSION b/VERSION index f6afdf0..5ed41a6 100644 --- a/VERSION +++ b/VERSION
@@ -1 +1 @@ -1.0.246 +1.0.247
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