Browse Source

Add targets to copy artefacts from ghdl-formal image

T. Meissner 1 month ago
parent
commit
ae5cf2b9fd
2 changed files with 20 additions and 1 deletions
  1. 2
    0
      .gitignore
  2. 18
    1
      Makefile

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
1
+artefacts
2
+*.tar.gz

+ 18
- 1
Makefile View File

@@ -1,4 +1,4 @@
1
-.PHONY: symbiyosys ghdl-formal all NOCACHE
1
+.PHONY: symbiyosys ghdl-formal all NOCACHE clean copy
2 2
 
3 3
 # Support for make environment variable NOCACHE
4 4
 ifeq (NOCACHE,$(lastword $(MAKECMDGOALS)))
@@ -18,8 +18,25 @@ else
18 18
     $(info INFO: Using user given tag '${TAG}')
19 19
 endif
20 20
 
21
+
21 22
 all: symbiyosys ghdl-formal
22 23
 
24
+copy: ghdl-formal_${TAG}.tar.gz
25
+
26
+
23 27
 .SECONDEXPANSION:
24 28
 symbiyosys ghdl-formal: $$@.Dockerfile
25 29
 	docker build ${OPTIONS} -t $@:${TAG} -f $@.Dockerfile .
30
+
31
+
32
+ghdl-formal_${TAG}.tar.gz:
33
+	mkdir -p artefacts
34
+	docker run --rm -dit --name=ghdl-dummy ghdl-formal:${TAG} > /dev/null
35
+	docker cp ghdl-dummy:/opt/. artefacts
36
+	docker rm -f ghdl-dummy > /dev/null
37
+	tar -C artefacts -czf ghdl-formal_${TAG}.tar.gz .
38
+
39
+
40
+clean:
41
+	rm -rf artefacts
42
+	rm -f ghdl-formal_*.tar.gz