From 23f217b1668415009a7a842b66012686c2f2d5b0 Mon Sep 17 00:00:00 2001 From: Russell L Friesenhahn Date: Tue, 16 Aug 2016 22:07:36 -0500 Subject: [PATCH 1/2] Allow redefining of the ABC repository URL For persons or organizations that prefer to keep their own mirrors of repositories, users may now specify the URL of the ABC Mercurial repository that yosys clones during build. The URL may be set in the Makefile directly, on the command-line, or in the environment --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f17f09259..c76838565 100644 --- a/Makefile +++ b/Makefile @@ -84,6 +84,7 @@ OBJS = kernel/version_$(GIT_REV).o # delete your work on ABC.. ABCREV = a86455b00da5 ABCPULL = 1 +ABCURL ?= https://bitbucket.org/alanmi/abc ABCMKARGS = CC="$(CXX)" CXX="$(CXX)" # set ABCEXTERNAL = to use an external ABC instance @@ -387,8 +388,8 @@ ifneq ($(ABCREV),default) fi $(Q) if test "`cd abc 2> /dev/null && hg identify | cut -f1 -d' '`" != "$(ABCREV)"; then \ test $(ABCPULL) -ne 0 || { echo 'REEBE: NOP abg hc gb qngr naq NOPCHYY frg gb 0 va Znxrsvyr!' | tr 'A-Za-z' 'N-ZA-Mn-za-m'; exit 1; }; \ - echo "Pulling ABC from bitbucket.org:"; set -x; \ - test -d abc || hg clone https://bitbucket.org/alanmi/abc abc; \ + echo "Pulling ABC from $(ABCURL):"; set -x; \ + test -d abc || hg clone $(ABCURL) abc; \ cd abc && $(MAKE) DEP= clean && hg pull && hg update -r $(ABCREV); \ fi endif From ee620c6a24a62725f6f41b43728fe7ce4112e130 Mon Sep 17 00:00:00 2001 From: Russell L Friesenhahn Date: Fri, 26 Aug 2016 11:15:36 -0500 Subject: [PATCH 2/2] Relax test to see if yosys dir is a git repository in Makefile This prevents the test from failing in the case that yosys is a submodule of a repository since for a submodule the .git is actually a file containing the location of the submodule's .git directory --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c76838565..55cd13158 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ else LDLIBS += -lrt endif -YOSYS_VER := 0.6+$(shell test -d .git && { git log --author=clifford@clifford.at --oneline 5869d26da021.. | wc -l; }) +YOSYS_VER := 0.6+$(shell test -e .git && { git log --author=clifford@clifford.at --oneline 5869d26da021.. | wc -l; }) GIT_REV := $(shell cd $(YOSYS_SRC) && git rev-parse --short HEAD 2> /dev/null || echo UNKNOWN) OBJS = kernel/version_$(GIT_REV).o