-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
58 lines (47 loc) · 1.65 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
GIT_HOOKS := .git/hooks/applied
SRC := AART_project/src
LCTW := AART_project/src/locales/tw/LC_MESSAGES
LCEN := AART_project/src/locales/en/LC_MESSAGES
hook: ${GIT_HOOKS}
aart:
@cd AART_project/src && python3 main.py || exit 1
$(GIT_HOOKS):
@bash ./scripts/install-git-hooks
@echo
AART: ${SRC}/main.py
cd $(CURDIR)/AART_project/src/; PYTHONPATH=$(CURDIR)/AART_project/ python3 ./main.py
genenpo: ${SRC}/config/configJSON.py \
${SRC}/device/device.py \
${SRC}/input/input.py \
${SRC}/main.py \
${SRC}/media/media.py \
${SRC}/output/output.py \
${SRC}/welcome/welcome.py
@mkdir -p ${SRC}/locales
pygettext3.5 -d base -o ${SRC}/locales/baseen.pot $^
@mkdir -p ${LCEN}
@sed -i 's/"Content-Type: text\/plain; charset=CHARSET\\n"/"Content-Type: text\/plain; charset=UTF-8\\n"/g' ${SRC}/locales/baseen.pot
@cp ${SRC}/locales/baseen.pot ${LCEN}/base.po
genenmo: ${LCEN}/base.po
msgfmt --statistics -D ${LCEN} -o ${LCEN}/base.mo base
gentwpo: ${SRC}/config/configJSON.py \
${SRC}/device/device.py \
${SRC}/input/input.py \
${SRC}/main.py \
${SRC}/media/media.py \
${SRC}/output/output.py \
${SRC}/welcome/welcome.py
@mkdir -p ${SRC}/locales
pygettext3.5 -d base -o ${SRC}/locales/basetw.pot $^
@mkdir -p ${LCTW}
@sed -i 's/"Content-Type: text\/plain; charset=CHARSET\\n"/"Content-Type: text\/plain; charset=UTF-8\\n"/g' ${SRC}/locales/basetw.pot
@cp ${SRC}/locales/basetw.pot ${LCTW}/base.po
gentwmo: ${LCTW}/base.po
msgfmt --statistics -D ${LCTW} -o ${LCTW}/base.mo base
.PHONY: gentwclean, genenclean
gentwclean:
rm -f ${SRC}/locales/basetw.pot
rm -f ${LCTW}/base.*
genenclean:
rm -f ${SRC}/locales/baseen.pot
rm -f ${LCEN}/base.*