-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathMakefile
84 lines (63 loc) · 1.84 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
80
81
82
83
84
.PHONY: doc
DESTDIR=build
help:
@echo "Please use \`make <target>' where <target> is one of these"
@echo "* General targets"
@echo " test to run all automated tests for this project"
@echo " doc to build documentation"
@echo " man to build manpage"
@echo " release to release new minor version"
@echo " packages to build packages for all distributions"
@echo ""
@echo "* Fedora targets"
@echo " rpm to build fedora package"
@echo " rpm-test to build fedora package locally"
@echo " rpm-try to build fedora package and install it"
@echo " rpm-copr to build fedora package through copr"
@echo " rpm-fedora to build fedora package through koji"
@echo ""
@echo "* Localization targets"
@echo " pot to generate .pot file from the code"
@echo " tx-push to push .pot file to transifex.com"
@echo " tx-pull to pull translated .po files from transifex.com"
@echo " mo to build .mo files"
release: test
tito tag
@echo
@echo Please visit https://github.com/FrostyX/tracer/tags and edit release notes
packages: rpm
test:
python -m pytest -v tests
doc:
@echo Move to ./doc/ directory and run
@echo make help
man:
make --directory=doc man
#
# Localizations
#
pot:
cd po && find ../tracer -iname "*.py" | \
xargs xgettext --from-code=UTF-8 --output=tracer.pot
tx-push: pot
tx push -s
tx-pull:
tx pull -s
mo:
mkdir -p $(DESTDIR)/locale/cs/LC_MESSAGES/
@# @TODO Rewrite next line to scan all languages
msgcat po/cs.po | msgfmt -o $(DESTDIR)/locale/cs/LC_MESSAGES/tracer.mo -
#
# RPM
#
rpm: rpm-copr
rpm-test:
tito build --rpm --test
rpm-try:
tito build --rpm --test --install
rpm-copr:
tito release copr
rpm-copr-test:
tito release copr-test
rpm-fedora:
tito release fedora-git