No Description

Makefile 924B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. .PHONY: symbiyosys ghdl-formal all NOCACHE clean copy
  2. # Support for make environment variable NOCACHE
  3. ifeq (NOCACHE,$(lastword $(MAKECMDGOALS)))
  4. OPTIONS := --no-cache
  5. $(info INFO: build without cache)
  6. $(eval $(lastword$(MAKECMDGOALS)):dummy;@:)
  7. endif
  8. NOCACHE:
  9. @#
  10. ifndef TAG
  11. TAG := latest
  12. $(info INFO: Using predefined tag 'latest')
  13. else
  14. $(info INFO: Using user given tag '${TAG}')
  15. endif
  16. all: symbiyosys ghdl-formal
  17. copy: ghdl-formal_${TAG}.tar.gz
  18. .SECONDEXPANSION:
  19. symbiyosys ghdl-formal: $$@.Dockerfile
  20. docker build ${OPTIONS} -t $@:${TAG} -f $@.Dockerfile .
  21. ghdl-formal_${TAG}.tar.gz:
  22. mkdir -p artefacts
  23. docker run --rm -dit --name=ghdl-dummy ghdl-formal:${TAG} > /dev/null
  24. docker cp ghdl-dummy:/opt/. artefacts
  25. docker rm -f ghdl-dummy > /dev/null
  26. tar -C artefacts -czf $@ .
  27. shasum --algorithm 256 --UNIVERSAL $@ > $@.sha256
  28. clean:
  29. rm -rf artefacts
  30. rm -f ghdl-formal_*.tar.*