-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
56 lines (41 loc) · 1.03 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
#
# Make file for various operations on Smart source code
#
DESTDIR=/
PYTHON?=python
prefix=/usr
bindir=$(prefix)/bin
all:
$(PYTHON) setup.py build
install:
$(PYTHON) setup.py install \
--root=$(DESTDIR) \
--prefix=$(prefix) \
--install-scripts=$(bindir)
dist:
$(PYTHON) setup.py sdist
rpm:
$(PYTHON) setup.py bdist_rpm
clean:
rm -rf build
find smart/ -name *.pyc -exec rm -f {} \;
find smart/ -name *.so -exec rm -f {} \;
find locale/ -name *.mo -exec rm -f {} \;
POTFILES=`find . -name '*.c' -o -name '*.py' | grep -v ./build/`
smart.pot:
xgettext --sort-by-file -o locale/smart.pot $(POTFILES)
update-po: smart.pot
for po in locale/*/LC_MESSAGES/smart.po; do \
echo -e "Merge: $$po: \c"; \
msgmerge -v -U $$po locale/smart.pot; \
done
check-po:
for po in locale/*/LC_MESSAGES/smart.po; do \
echo -e "Check: $$po: \c"; \
msgfmt -o /dev/null --statistics -v -c $$po; \
done
ext:
$(PYTHON) setup.py build_ext -i
test: ext
LC_ALL=C LANG=C $(PYTHON) test $(TEST)
.PHONY: clean smart.pot update-po check-po ext test