From 77ce8139a5428961f95a4eee4983fb932dae002b Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Thu, 13 Oct 2016 17:34:15 -0300 Subject: [PATCH 1/4] Added a new configuration variable GIT_REV_WHERE It determines from where we get the gits SHA1 value. By default is HEAD, suitable for Clifford, but for Debian we can define it as upstream/master --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1785904a5..ff0af4c1e 100644 --- a/Makefile +++ b/Makefile @@ -72,8 +72,9 @@ else LDLIBS += -lrt endif +GIT_REV_WHERE ?= HEAD 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) +GIT_REV := $(shell cd $(YOSYS_SRC) && git rev-parse --short $(GIT_REV_WHERE) 2> /dev/null || echo UNKNOWN) OBJS = kernel/version_$(GIT_REV).o # set 'ABCREV = default' to use abc/ as it is From f263b175b5d6dc464dd46119a16e9413c5907134 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Thu, 13 Oct 2016 17:38:42 -0300 Subject: [PATCH 2/4] Modified test target name (to test-all) As this target depends on external tools, and packagers run "make test", I think the name should be less generic. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ff0af4c1e..4534d619e 100644 --- a/Makefile +++ b/Makefile @@ -411,7 +411,7 @@ else SEEDOPT="" endif -test: $(TARGETS) $(EXTRA_TARGETS) +test-all: $(TARGETS) $(EXTRA_TARGETS) +cd tests/simple && bash run-test.sh $(SEEDOPT) +cd tests/hana && bash run-test.sh $(SEEDOPT) +cd tests/asicworld && bash run-test.sh $(SEEDOPT) @@ -558,6 +558,6 @@ echo-git-rev: -include kernel/*.d -include techlibs/*/*.d -.PHONY: all top-all abc test install install-abc manual clean mrproper qtcreator +.PHONY: all top-all abc test-all install install-abc manual clean mrproper qtcreator .PHONY: config-clean config-clang config-gcc config-gcc-4.8 config-gprof config-sudo From cc8f29a1e60030dc81099c40a99a1f8731bbf114 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Thu, 13 Oct 2016 17:51:14 -0300 Subject: [PATCH 3/4] Allow to overwrite ABCEXTERNAL from the environment. In this way Debian scripts can define it as berkeley-abc from the shell. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4534d619e..9f16a4fb7 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,7 @@ ABCMKARGS = CC="$(CXX)" CXX="$(CXX)" # set ABCEXTERNAL = to use an external ABC instance # Note: The in-tree ABC (yosys-abc) will not be installed when ABCEXTERNAL is set. -ABCEXTERNAL = +ABCEXTERNAL ?= define newline From 80749f174c83a3c52c6035a11ed8ed2bf1db0f91 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Thu, 13 Oct 2016 17:57:09 -0300 Subject: [PATCH 4/4] Ugh! extra patches got here, reverting --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9f16a4fb7..c3f225688 100644 --- a/Makefile +++ b/Makefile @@ -72,9 +72,8 @@ else LDLIBS += -lrt endif -GIT_REV_WHERE ?= HEAD 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 $(GIT_REV_WHERE) 2> /dev/null || echo UNKNOWN) +GIT_REV := $(shell cd $(YOSYS_SRC) && git rev-parse --short HEAD 2> /dev/null || echo UNKNOWN) OBJS = kernel/version_$(GIT_REV).o # set 'ABCREV = default' to use abc/ as it is @@ -411,7 +410,7 @@ else SEEDOPT="" endif -test-all: $(TARGETS) $(EXTRA_TARGETS) +test: $(TARGETS) $(EXTRA_TARGETS) +cd tests/simple && bash run-test.sh $(SEEDOPT) +cd tests/hana && bash run-test.sh $(SEEDOPT) +cd tests/asicworld && bash run-test.sh $(SEEDOPT) @@ -558,6 +557,6 @@ echo-git-rev: -include kernel/*.d -include techlibs/*/*.d -.PHONY: all top-all abc test-all install install-abc manual clean mrproper qtcreator +.PHONY: all top-all abc test install install-abc manual clean mrproper qtcreator .PHONY: config-clean config-clang config-gcc config-gcc-4.8 config-gprof config-sudo