-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
59 lines (41 loc) · 1 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
SUBDIR_GOALS= all clean distclean
SUBDIR+= src/ladok3
SUBDIR+= examples
SUBDIR+= doc
SUBDIR+= docker
version=$(shell sed -n 's/^ *version *= *"\([^"]\+\)"/\1/p' pyproject.toml)
dist=$(addprefix dist/ladok3-${version}, -py3-none-any.whl .tar.gz)
.PHONY: all
all:
true
.PHONY: install
install:
pip3 install -e .
.PHONY: compile
compile:
${MAKE} -C src/ladok3 all
requirements.txt:
poetry export -f requirements.txt --output $@
.PHONY: build
build: compile
poetry build
.PHONY: publish publish-github publish-pypi publish-docker
publish: publish-github publish-pypi publish-docker
publish-github: doc/ladok3.pdf
git push
gh release create -t v${version} v${version} doc/ladok3.pdf
doc/ladok3.pdf:
${MAKE} -C $(dir $@) $(notdir $@)
publish-pypi: build
poetry publish
publish-docker:
sleep 60
${MAKE} -C docker publish
.PHONY: clean
clean:
true
.PHONY: distclean
distclean:
${RM} -R build dist ladok3.egg-info src/ladok3.egg-info
INCLUDE_MAKEFILES=./makefiles
include ${INCLUDE_MAKEFILES}/subdir.mk