Merge pull request #323 from mithro/fix-make-submodule
Fix the cloning of library submodules
This commit is contained in:
commit
00bdbcf4a3
6
Makefile
6
Makefile
|
@ -79,9 +79,9 @@ all: README.rst
|
||||||
@true
|
@true
|
||||||
|
|
||||||
|
|
||||||
LIBRARIES = $(sort $(notdir $(wildcard libraries/sky130_*_sc_*)))
|
SC_LIBS = $(sort $(notdir $(wildcard libraries/sky130_*_sc_*)))
|
||||||
|
|
||||||
$(LIBRARIES): | $(CONDA_ENV_PYTHON)
|
$(SC_LIBS): | $(CONDA_ENV_PYTHON)
|
||||||
@$(IN_CONDA_ENV) for V in libraries/$@/*; do \
|
@$(IN_CONDA_ENV) for V in libraries/$@/*; do \
|
||||||
if [ -d "$$V/cells" ]; then \
|
if [ -d "$$V/cells" ]; then \
|
||||||
python -m skywater_pdk.liberty $$V; \
|
python -m skywater_pdk.liberty $$V; \
|
||||||
|
@ -99,7 +99,7 @@ sky130_fd_sc_ms-leakage: | $(CONDA_ENV_PYTHON)
|
||||||
|
|
||||||
sky130_fd_sc_ms: sky130_fd_sc_ms-leakage
|
sky130_fd_sc_ms: sky130_fd_sc_ms-leakage
|
||||||
|
|
||||||
timing: $(LIBRARIES) | $(CONDA_ENV_PYTHON)
|
timing: $(SC_LIBS) | $(CONDA_ENV_PYTHON)
|
||||||
@true
|
@true
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,19 +21,24 @@ ifeq (,$(FULL_VERSION))
|
||||||
$(error "Version value could not be determined. Make sure you fetch the tags.")
|
$(error "Version value could not be determined. Make sure you fetch the tags.")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
submodules: libraries/sky130_fd_sc_hd/$(SUBMODULE_VERSION)/.git libraries/sky130_fd_sc_hdll/$(SUBMODULE_VERSION)/.git libraries/sky130_fd_sc_hs/$(SUBMODULE_VERSION)/.git libraries/sky130_fd_sc_ms/$(SUBMODULE_VERSION)/.git libraries/sky130_fd_sc_ls/$(SUBMODULE_VERSION)/.git
|
LIBRARIES = $(sort $(notdir $(wildcard libraries/sky130_*)))
|
||||||
|
|
||||||
libraries/sky130_fd_sc_hd/%/.git: .gitmodules
|
LIBS_DOT_GIT = $(addsuffix /$(SUBMODULE_VERSION)/.git,$(addprefix libraries/,$(LIBRARIES)))
|
||||||
git submodule update --init $(@D)
|
|
||||||
|
|
||||||
libraries/sky130_fd_sc_hdll/%/.git: .gitmodules
|
libraries-info:
|
||||||
git submodule update --init $(@D)
|
@echo "The following libraries exist:"
|
||||||
|
@for L in $(LIBRARIES); do \
|
||||||
|
LD=libraries/$$L/$(SUBMODULE_VERSION); \
|
||||||
|
echo " * $$L"; \
|
||||||
|
echo " $$(git submodule status $$LD)"; \
|
||||||
|
done
|
||||||
|
@echo $(LIBS_DOT_GIT)
|
||||||
|
|
||||||
libraries/sky130_fd_sc_hs/%/.git: .gitmodules
|
submodules: $(LIBS_DOT_GIT)
|
||||||
git submodule update --init $(@D)
|
|
||||||
|
|
||||||
libraries/sky130_fd_sc_ms/%/.git: .gitmodules
|
define LIB_template
|
||||||
git submodule update --init $(@D)
|
libraries/$(1)/%/.git: .gitmodules
|
||||||
|
git submodule update --init $$(@D)
|
||||||
|
endef
|
||||||
|
|
||||||
libraries/sky130_fd_sc_ls/%/.git: .gitmodules
|
$(foreach lib,$(LIBRARIES), $(eval $(call LIB_template,$(lib))))
|
||||||
git submodule update --init $(@D)
|
|
||||||
|
|
Loading…
Reference in New Issue