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