From fdbe8714c9337e8125470c9d4bc28e9b141e3997 Mon Sep 17 00:00:00 2001 From: Roland Coeurjoly Date: Fri, 12 Apr 2024 14:29:05 +0200 Subject: [PATCH] Check that abc is checkout out as a git repo --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2188c52e1..e7a1248c4 100644 --- a/Makefile +++ b/Makefile @@ -780,9 +780,20 @@ $(PROGRAM_PREFIX)yosys-config: misc/yosys-config.in -e 's#@BINDIR@#$(strip $(BINDIR))#;' -e 's#@DATDIR@#$(strip $(DATDIR))#;' < $< > $(PROGRAM_PREFIX)yosys-config $(Q) chmod +x $(PROGRAM_PREFIX)yosys-config +.PHONY: check-git-abc + +check-git-abc: + @if [ -f "$(YOSYS_SRC)/abc/.git" ]; then \ + echo "abc/.git exists"; \ + exit 0; \ + else \ + echo "abc/.git does not exist. Please execute git submodule update --init"; \ + exit 1; \ + fi + ABC_SOURCES := $(wildcard $(YOSYS_SRC)/abc/*) -abc/abc$(EXE) abc/libabc.a: $(ABC_SOURCES) +abc/abc$(EXE) abc/libabc.a: $(ABC_SOURCES) check-git-abc $(P) $(Q) mkdir -p abc && $(MAKE) -C $(PROGRAM_PREFIX)abc -f "$(realpath $(YOSYS_SRC)/abc/Makefile)" ABCSRC="$(realpath $(YOSYS_SRC)/abc/)" $(S) $(ABCMKARGS) $(if $(filter %.a,$@),PROG="abc",PROG="abc$(EXE)") MSG_PREFIX="$(eval P_OFFSET = 5)$(call P_SHOW)$(eval P_OFFSET = 10) ABC: " $(if $(filter %.a,$@),libabc.a)