-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (50 loc) · 2.27 KB
/
Makefile
File metadata and controls
73 lines (50 loc) · 2.27 KB
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
BUILDUI=./utils/buildui.py -5
UIC_SOURCE_FILES=$(wildcard data/*.ui)
UIC_PYTHON_FILES=$(patsubst data/%.ui,jabbercat/ui/%.py,$(UIC_SOURCE_FILES))
RESOURCE_SOURCES=$(addprefix data/,$(shell xpath -e 'RCC/qresource/file/text()' data/resources.qrc 2>/dev/null))
_RCC5!=which qtchooser 2>/dev/null && echo -run-tool=rcc -qt=5 || which rcc-qt5 2>/dev/null
RCC5?=$(_RCC5)
TS_FILES=$(wildcard translations/*.ts)
TESTS?=tests/
all: $(UIC_PYTHON_FILES) resources.rcc data/js/emoji.json
clean:
rm -rf $(UIC_PYTHON_FILES)
lupdate:
pylupdate5 -verbose jabbercat.pro
lrelease: $(TS_FILES)
lrelease-qt5 jabbercat.pro
$(UIC_PYTHON_FILES): jabbercat/ui/%.py: data/%.ui
$(BUILDUI) $< $@
resources.rcc: data/resources.qrc $(RESOURCE_SOURCES)
cd data; $(RCC5) --binary -o ../$@ resources.qrc
docs-html:
cd docs; make html
debug-logs:
mkdir -p debug-logs
data/emoji-java:
test ! -d "$@" && git clone --depth 1 https://github.com/vdurmont/emoji-java "$@" || test -d "$@"
cd "$@"; git pull
data/emoji-java/src/main/resources/emojis.json: data/emoji-java
data/gemoji:
test ! -d "$@" && git clone --depth 1 https://github.com/github/gemoji "$@" || test -d "$@"
cd "$@"; git pull
data/gemoji/db/emoji.json: data/gemoji
data/js/emoji.json: data/emoji-java/src/main/resources/emojis.json data/gemoji/db/emoji.json
PYTHONPATH=. python3 utils/build-emojidb.py --emoji-java data/emoji-java/src/main/resources/emojis.json --gemoji data/gemoji/db/emoji.json "$@"
@echo "that 'failed to load emoji database' you might‘ve just seen was "
@echo "normal and NOT an error"
debug-run: run-debug
run-debug: logfile_name=debug-logs/jabbercat-$(shell date '+%Y-%m-%dT%H-%M-%S').log
run-debug: all debug-logs
@echo
@echo "=== logs will also be in $(logfile_name) ==="
@echo "open http://localhost:1234 in a Chromium-like browser to debug message view issues"
@echo
python3 -m jabbercat --version | tee $(logfile_name)
PYTHONUNBUFFERED=x QTWEBENGINE_REMOTE_DEBUGGING=1234 PYTHONASYNCIODEBUG=1 python3 -m jabbercat 2>&1 | tee -a $(logfile_name) || true
@echo
@echo "=== logs have been written to $(logfile_name) ==="
@echo
test: all
QTWEBENGINE_REMOTE_DEBUGGING=1234 LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_DATE=C.UTF-8 LC_TIME=C.UTF-8 TZ=Etc/UTC nosetests3 $(TESTS)
.PHONY: lupdate docs-html run-debug debug-logs debug-run