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
|
# Makefile for Computer Janitor
# Copyright (C) 2008, 2009 Canonical, Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
all: data/computer-janitor-gtk.desktop
DESKTOP=data/computer-janitor-gtk.desktop
$(DESKTOP): $(DESKTOP).in
intltool-merge -d po $(DESKTOP).in $(DESKTOP)
check: check-unittests check-has-unit-tests check-licenses
check-unittests:
env COMPUTER_JANITOR_UNITTEST=yes LC_ALL=C python -m CoverageTestRunner
rm -f .coverage
check-has-unit-tests:
find computerjanitorapp -name '*.py' ! -name '*_tests.py' | \
grep -Exv '^computerjanitorapp/(__init__|ui_gtk).py' | \
sed 's/\.py$$//' | \
while read file; do \
[ -e $${file}_tests.py ] || \
(echo "Missing unit test: $$file.py"; exit 1); done
check-licenses:
./license-check
clean:
rm -f computerjanitorapp/*.py[co] .coverage
rm -f po/computerjanitor.pot
rm -rf build $(DESKTOP)
update-po:
(echo '[encoding: UTF-8]'; \
ls computerjanitorapp/*.py data/*.glade data/*.in plugins/*.py) \
> po/POTFILES.in
python setup.py build_i18n --merge-po --po-dir po
|