From ae5cf2b9fdecdf8458f24b2b033917ec19c207a0 Mon Sep 17 00:00:00 2001 From: tmeissner Date: Mon, 25 May 2020 16:20:17 +0200 Subject: [PATCH] Add targets to copy artefacts from ghdl-formal image --- .gitignore | 2 ++ Makefile | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5c23ec8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +artefacts +*.tar.gz diff --git a/Makefile b/Makefile index 6ed4aad..6b59be3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: symbiyosys ghdl-formal all NOCACHE +.PHONY: symbiyosys ghdl-formal all NOCACHE clean copy # Support for make environment variable NOCACHE ifeq (NOCACHE,$(lastword $(MAKECMDGOALS))) @@ -18,8 +18,25 @@ else $(info INFO: Using user given tag '${TAG}') endif + all: symbiyosys ghdl-formal +copy: ghdl-formal_${TAG}.tar.gz + + .SECONDEXPANSION: symbiyosys ghdl-formal: $$@.Dockerfile docker build ${OPTIONS} -t $@:${TAG} -f $@.Dockerfile . + + +ghdl-formal_${TAG}.tar.gz: + mkdir -p artefacts + docker run --rm -dit --name=ghdl-dummy ghdl-formal:${TAG} > /dev/null + docker cp ghdl-dummy:/opt/. artefacts + docker rm -f ghdl-dummy > /dev/null + tar -C artefacts -czf ghdl-formal_${TAG}.tar.gz . + + +clean: + rm -rf artefacts + rm -f ghdl-formal_*.tar.gz