summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-08-21 20:11:26 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-08-21 20:12:26 (GMT)
commitbd806effc3ef621a5f76e236a35f5056a6d8e92e (patch)
treef36ca89cdde5d9c4698f97f50e47a9c6170bdd06 /Makefile
parent5aa07e13a5e08ab97a2cb54e083dd6780985dee4 (diff)
Makefile: Add a dist rule to generate binary releases
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 19 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d8cae8e..b4e3a68 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,7 @@ ifdef BOARD
BOARD_SAFE = $(BOARD)
endif
BOARD ?= $(error Please set BOARD=)
+VERSION ?= $(patsubst v%,%,$(shell git describe --tags))
clean :
$(RM) -r \
@@ -85,10 +86,27 @@ docs:
$(MAKE) -C docs html
touch docs/build/html/.nojekyll
-
sim:
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=.:wasp/boards/simulator:wasp \
python3 -i wasp/boards/simulator/main.py
.PHONY: bootloader reloader docs micropython
+dist: DIST=../wasp-os-$(VERSION)
+dist: k9
+k9: p8
+p8: pinetime
+k9 p8 pinetime:
+ $(MAKE) BOARD=$@ clean
+ $(MAKE) BOARD=$@ all
+dist: docs
+ $(RM) -rf $(DIST)
+ mkdir -p $(DIST)/docs
+ cp COPYING COPYING.LGPL README.rst $(DIST)
+ cp -r docs/build/html/* $(DIST)/docs
+ cp -r build-pinetime/ build-p8/ build-k9/ $(DIST)
+ cp -r tools/ $(DIST)
+ (cd $(DIST); ln -s docs/_images/ res)
+ find $(DIST) -name __pycache__ | xargs $(RM) -r
+ tar -C .. -zcf $(DIST).tar.gz $(notdir $(DIST))
+