Noticed that "test -d" on an empty string returns true, and so the makefile attempts to build libraries even if they have been disabled in configuration. Fixed this by adding an additional check for a non-empty string as was done in other places in the Makefile. Fixed for both sky130 and gf180mcu.
diff --git a/VERSION b/VERSION index 49f9630..b2844ba 100644 --- a/VERSION +++ b/VERSION
@@ -1 +1 @@ -1.0.432 +1.0.433
diff --git a/gf180mcu/Makefile.in b/gf180mcu/Makefile.in index 11856c2..649665c 100644 --- a/gf180mcu/Makefile.in +++ b/gf180mcu/Makefile.in
@@ -816,39 +816,51 @@ vendor-D: primitive-build-D digital-7t5v0-build-D digital-9t5v0-build-D io-build-D sram-build-D digital-osu-build-D primitive-build-%: - if test -d ${GF180MCU_PR_PATH} ; then \ - echo "Building primitives library and simulation models" ;\ - make primitive-$* ;\ + if test "x${GF180MCU_PR_PATH}" != "x" ; then \ + if test -d ${GF180MCU_PR_PATH} ; then \ + echo "Building primitives library and simulation models" ;\ + make primitive-$* ;\ + fi ;\ fi io-build-%: - if test -d ${GF180MCU_IO_PATH} ; then \ - echo "Building padframe I/O libraries" ;\ - make io-$* ;\ + if test "x${GF180MCU_IO_PATH}" != "x" ; then \ + if test -d ${GF180MCU_IO_PATH} ; then \ + echo "Building padframe I/O libraries" ;\ + make io-$* ;\ + fi ;\ fi digital-9t5v0-build-%: - if test -d ${GF180MCU_SC_9T5V0_PATH} ; then \ - echo "Building 5V 9-track digital standard cell libraries" ;\ - make digital-9t5v0-$* ;\ + if test "x${GF180MCU_SC_9T5V0_PATH}" != "x" ; then \ + if test -d ${GF180MCU_SC_9T5V0_PATH} ; then \ + echo "Building 5V 9-track digital standard cell libraries" ;\ + make digital-9t5v0-$* ;\ + fi ;\ fi digital-7t5v0-build-%: - if test -d ${GF180MCU_SC_7T5V0_PATH} ; then \ - echo "Building 5V 7-track digital standard cell libraries" ;\ - make digital-7t5v0-$* ;\ + if test "x${GF180MCU_SC_7T5V0_PATH}" != "x" ; then \ + if test -d ${GF180MCU_SC_7T5V0_PATH} ; then \ + echo "Building 5V 7-track digital standard cell libraries" ;\ + make digital-7t5v0-$* ;\ + fi ;\ fi sram-build-%: - if test -d ${GF180MCU_SRAM_PATH} ; then \ - echo "Building SRAM libraries" ;\ - make sram-$* ;\ + if test "x${GF180MCU_SRAM_PATH}" != "x" ; then \ + if test -d ${GF180MCU_SRAM_PATH} ; then \ + echo "Building SRAM libraries" ;\ + make sram-$* ;\ + fi ;\ fi digital-osu-build-%: - if test -d ${GF180MCU_OSU_SC_PATH} ; then \ - echo "Building OSU 3.3V digital standard cell libraries" ;\ - make digital-osu-$* ;\ + if test "x${GF180MCU_OSU_SC_PATH}" != "x" ; then \ + if test -d ${GF180MCU_OSU_SC_PATH} ; then \ + echo "Building OSU 3.3V digital standard cell libraries" ;\ + make digital-osu-$* ;\ + fi ;\ fi primitive-%:
diff --git a/sky130/Makefile.in b/sky130/Makefile.in index b533e0d..7886f88 100644 --- a/sky130/Makefile.in +++ b/sky130/Makefile.in
@@ -1370,81 +1370,99 @@ vendor-B: primitive-build-B io-build-B sram-build-B sram-space-build-B digital-hd-build-B digital-hvl-build-B digital-hdll-build-B digital-lp-build-B digital-hs-build-B digital-ms-build-B digital-ls-build-B alpha-build-B osu-t12-build-B osu-t15-build-B osu-t18-build-B primitive-build-%: - if test -d ${SKY130_PR_PATH} ; then \ - echo "Building primitives library and simulation models" ;\ - make primitive-$*;\ + if test "x${SKY130_PR_PATH}" != "x" ; then \ + if test -d ${SKY130_PR_PATH} ; then \ + echo "Building primitives library and simulation models" ; \ + make primitive-$*; \ + fi ; \ fi io-build-%: - if test -d ${SKY130_IO_PATH} ; then \ - echo "Building padframe I/O libraries" ;\ - make io-$* ;\ + if test "x${SKY130_IO_PATH}" != "x" ; then \ + if test -d ${SKY130_IO_PATH} ; then \ + echo "Building padframe I/O libraries" ; \ + make io-$* ; \ + fi ; \ fi digital-hd-build-%: - if test -d ${SKY130_SC_HD_PATH} ; then \ - echo "Building digital high-density standard cell library" ;\ - make digital-hd-$* ;\ + if test "x${SKY130_SC_HD_PATH}" != "x" ; then \ + if test -d ${SKY130_SC_HD_PATH} ; then \ + echo "Building digital high-density standard cell library" ; \ + make digital-hd-$* ; \ + fi ; \ fi digital-hvl-build-%: - if test -d ${SKY130_SC_HVL_PATH} ; then \ - echo "Building digital high-voltage standard cell library" ;\ - make digital-hvl-$* ;\ + if test "x${SKY130_SC_HVL_PATH}" != "x" ; then \ + if test -d ${SKY130_SC_HVL_PATH} ; then \ + echo "Building digital high-voltage standard cell library" ; \ + make digital-hvl-$* ; \ + fi ; \ fi digital-hdll-build-%: - if test -d ${SKY130_SC_HDLL_PATH} ; then \ - echo "Building digital high-density low-leakage standard cell library" ;\ - make digital-hdll-$* ;\ + if test "x${SKY130_SC_HDLL_PATH}" != "x" ; then \ + if test -d ${SKY130_SC_HDLL_PATH} ; then \ + echo "Building digital high-density low-leakage standard cell library" ; \ + make digital-hdll-$* ; \ + fi ; \ fi digital-lp-build-%: - if test -d ${SKY130_SC_LP_PATH} ; then \ - echo "Building digital low-power standard cell library" ;\ - make digital-lp-$* ;\ + if test "x${SKY130_SC_LP_PATH}" != "x" ; then \ + if test -d ${SKY130_SC_LP_PATH} ; then \ + echo "Building digital low-power standard cell library" ; \ + make digital-lp-$* ; \ + fi ; \ fi digital-hs-build-%: - if test -d ${SKY130_SC_HS_PATH} ; then \ - echo "Building digital high-speed standard cell library" ;\ - make digital-hs-$* ;\ + if test "x${SKY130_SC_HS_PATH}" != "x" ; then \ + if test -d ${SKY130_SC_HS_PATH} ; then \ + echo "Building digital high-speed standard cell library" ; \ + make digital-hs-$* ; \ + fi ; \ fi digital-ms-build-%: - if test -d ${SKY130_SC_MS_PATH} ; then \ - echo "Building digital medium-speed standard cell library" ;\ - make digital-ms-$* ;\ + if test "x${SKY130_SC_MS_PATH}" != "x" ; then \ + if test -d ${SKY130_SC_MS_PATH} ; then \ + echo "Building digital medium-speed standard cell library" ; \ + make digital-ms-$* ; \ + fi ; \ fi digital-ls-build-%: - if test -d ${SKY130_SC_LS_PATH} ; then \ - echo "Building digital low-speed standard cell library" ;\ - make digital-ls-$* ;\ + if test "x${SKY130_SC_LS_PATH}" != "x" ; then \ + if test -d ${SKY130_SC_LS_PATH} ; then \ + echo "Building digital low-speed standard cell library" ; \ + make digital-ls-$* ; \ + fi ; \ fi alpha-build-%: if test "x${ALPHA_PATH}" != "x" ; then \ - echo "Building alphanumeric layout libraries" ;\ - make alpha-$* ;\ + echo "Building alphanumeric layout libraries" ; \ + make alpha-$* ; \ fi sram-build-%: if test "x${SRAM_PATH}" != "x" ; then \ - echo "Building SRAM macro library" ;\ - make sram-$* ;\ + echo "Building SRAM macro library" ; \ + make sram-$* ; \ fi sram-space-build-%: if test "x${SRAM_SPACE_PATH}" != "x" ; then \ - echo "Building SRAM build-space library" ;\ - make sram-space-$* ;\ + echo "Building SRAM build-space library" ; \ + make sram-space-$* ; \ fi osu-t12-build-%: if test "x${OSU_T12_PATH}" != "x" ; then \ - echo "Building OSU 12-track-high standard cell library" ;\ - make osu-t12-$* ;\ + echo "Building OSU 12-track-high standard cell library" ; \ + make osu-t12-$* ; \ fi osu-t15-build-%: @@ -1455,8 +1473,8 @@ osu-t18-build-%: if test "x${OSU_T18_PATH}" != "x" ; then \ - echo "Building OSU 18-track-high standard cell library" ;\ - make osu-t18-$* ;\ + echo "Building OSU 18-track-high standard cell library" ; \ + make osu-t18-$* ; \ fi primitive-%: