/
Makefile
79 lines (59 loc) · 2.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Convenience Makefile for dealing with the Piksi tools and console
# client. Please read and understand the contents of this file before
# using it to do Crazy Things.
SWIFTNAV_ROOT := $(CURDIR)
export PYTHONPATH := .
ifeq ("$(OS)","Windows_NT")
UNAME := Windows
else
UNAME := $(shell uname -s)
endif
MAKEFLAGS += SWIFTNAV_ROOT=$(SWIFTNAV_ROOT)
.PHONY: help deps serial_deps build_console
help:
@echo
@echo "Piksi Tools helper"
@echo
@echo "(Please read before using!)"
@echo
@echo "Please use \`make <target>' where <target> is one of"
@echo " help to display this help message"
@echo " deps to install all dependencies (includes UI deps)"
@echo " serial_deps to install serial dependencies (no UI deps)"
@echo " build_console to build the console binary and installer"
@echo " gen_readme generate console command line options readme"
@echo
all: deps
deps:
cd $(SWIFTNAV_ROOT)/tasks && bash setup.sh && cd $(SWIFTNAV_ROOT)
.conda_py35:
conda create -p $(PWD)/.conda_py35 python=3.5 --yes
tox_all:
@echo Using TESTENV=$(TESTENV), TOXENV=$(TOXENV)...
tox $(if $(filter y,$(VERBOSE)), -v,)
tox_Darwin: export TESTENV:=$(TESTENV)
tox_Darwin: export TOXENV:=$(TOXENV)
tox_Darwin: tox_all
tox: .conda_py35
tox: export PATH:=$(CURDIR)/.conda_py35/bin:$(PATH)
tox: tox_$(UNAME)
test: tox
serial_deps:
pip install -r requirements.txt
gen_readme:
PYTHONPATH=. piksi_tools/console/console.py -h > piksi_tools/console/README.txt
tail -n +2 piksi_tools/console/README.txt > tmp.txt && mv tmp.txt piksi_tools/console/README.txt
build_console_all:
python ./scripts/build_release.py
build_console_Darwin: export PATH:=$(CURDIR)/.conda_py35/bin:$(PATH)
build_console_Darwin: .conda_py35
build_console_Darwin: build_console_all
build_console_Linux: build_console_all
build_console_Windows: build_console_all
build_console: build_console_$(UNAME)
release:
$(call announce-begin,"Run release boilerplate")
github_changelog_generator --no-author \
-t $(CHANGELOG_GITHUB_TOKEN)$ \
-o DRAFT_CHANGELOG.md \
swift-nav/piksi_tools