-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (49 loc) · 1.59 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
EXTS = $(shell find extensions/ -maxdepth 1 -mindepth 1 -type d | tac)
EXTS_FLATPAK = $(addsuffix .flatpak, $(EXTS))
EXTS_TEST = $(addsuffix .test, $(EXTS))
EXTS_PIP = $(addsuffix .pip, $(EXTS))
BLPS = $(shell find . -name "*.blp")
UIS = $(BLPS:.blp=.ui)
.PHONY: docs test
help:
cat Makefile
flatpak_remote_flathub:
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
install_flatpak: compile-blueprint flatpak_remote_flathub
flatpak-builder --user --install .flatpak-build/ org.blackfennec.app.yml --force-clean --install-deps-from flathub --repo=.flatpak-repo
install_flatpak_extensions: compile-blueprint $(EXTS_FLATPAK)
%.flatpak:
# remove the trailing .flatpak
$(eval EXT := $(subst .flatpak,,$@))
cd "$(EXT)" && make flatpak
run_flatpak:
flatpak run org.blackfennec.app
generate_code_docs:
sphinx-apidoc -f -q -o docs/source/development/code/ . setup.py
docs: generate_code_docs
cd docs/; make html
pdf: generate_code_docs
cd docs/; make latexpdf
compile-blueprint: $(UIS)
%.ui: %.blp
blueprint-compiler compile "$<" --output "$@"
lint:
find . -name "*.py" | xargs pylint --output-format=text || true
test_all: test test_extensions
test:
pytest tests/;
test_extensions: $(EXTS_TEST)
%.test:
# remove the trailing .test
$(eval EXT := $(subst .test,,$@))
cd "$(EXT)" && make test
install_all: install install_extensions
install:
python -m pip install -e .
install_extensions: $(EXTS_PIP)
%.pip:
# remove the trailing .pip
$(eval EXT := $(subst .pip,,$@))
cd "$(EXT)" && make install
run: compile-blueprint install
python blackfennec.py