l10n: Updates to French (fr) translation
[gpodder.git] / Makefile
blob0f13e88d7f7e9ca01a8e609b13b421ac58760a93
2 # gPodder - A media aggregator and podcast client
3 # Copyright (c) 2005-2010 Thomas Perl and the gPodder Team
5 # gPodder is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # gPodder is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ##########################################################################
22 BINFILE=bin/gpodder
23 MESSAGESPOT=data/messages.pot
25 UIFILES=$(wildcard data/ui/*.ui \
26 data/ui/desktop/*.ui \
27 data/ui/maemo/*.ui \
28 data/ui/frmntl/*.ui)
29 UIFILES_H=$(subst .ui,.ui.h,$(UIFILES))
30 TRANSLATABLE_SOURCE=$(wildcard src/gpodder/*.py \
31 src/gpodder/gtkui/*.py \
32 src/gpodder/gtkui/interface/*.py \
33 src/gpodder/gtkui/desktop/*.py \
34 src/gpodder/gtkui/maemo/*.py \
35 src/gpodder/gtkui/frmntl/*.py)
37 HELP2MAN=help2man
38 MANPAGE=doc/man/gpodder.1
40 GPODDER_ICON_THEME=dist/gpodder
42 GPODDER_SERVICE_FILE=data/org.gpodder.service
43 GPODDER_SERVICE_FILE_IN=$(addsuffix .in,$(GPODDER_SERVICE_FILE))
45 DESTDIR ?= /
46 PREFIX ?= /usr
48 ##########################################################################
50 all: help
52 help:
53 @echo 'make test run gpodder in local directory'
54 @echo 'make unittest run doctests + unittests'
55 @echo 'make mtest run gpodder (for maemo scratchbox)'
56 @echo 'make release create source tarball in "dist/"'
57 @echo 'make releasetest run some tests before the release'
58 @echo 'make install install gpodder into "$(PREFIX)"'
59 @echo 'make manpage update manpage (on release)'
60 @echo 'make messages update messages.pot + .po files + .mo files'
61 @echo 'make clean remove generated+temp+*.py{c,o} files'
62 @echo 'make distclean do a "make clean" + remove "dist/"'
63 @echo ''
64 @echo 'make install-git-menuitem Add shortcuts to your menu for this git checkout'
65 @echo 'make remove-git-menuitem Remove shortcuts created by "install-git-menuitem"'
67 ##########################################################################
69 test:
70 @# set xterm title to know what this window does ;)
71 @echo -ne '\033]0;gPodder console (make test)\007'
72 $(BINFILE) --verbose
74 unittest:
75 PYTHONPATH=src/ python -m gpodder.unittests
77 mtest:
78 @# in maemo scratchbox, we need this for osso/hildon
79 run-standalone.sh python2.5 $(BINFILE) --maemo --verbose
81 deb:
82 debuild
84 release: distclean
85 python setup.py sdist
87 releasetest: unittest
88 desktop-file-validate data/gpodder.desktop
89 make -C data/po validate
91 $(GPODDER_SERVICE_FILE): $(GPODDER_SERVICE_FILE_IN)
92 sed -e 's#__PREFIX__#$(PREFIX)#' $< >$@
94 install: messages $(GPODDER_SERVICE_FILE)
95 python setup.py install --root=$(DESTDIR) --prefix=$(PREFIX)
97 ##########################################################################
99 manpage: $(MANPAGE)
101 $(MANPAGE): src/gpodder/__init__.py $(BINFILE)
102 $(HELP2MAN) --name="A Media aggregator and Podcast catcher" -N $(BINFILE) >$(MANPAGE)
104 ##########################################################################
106 messages: $(MESSAGESPOT)
107 make -C data/po
109 data/ui/%.ui.h: $(UIFILES)
110 intltool-extract --quiet --type=gettext/glade $(subst .ui.h,.ui,$@)
112 $(MESSAGESPOT): $(TRANSLATABLE_SOURCE) $(UIFILES_H) $(BINFILE)
113 xgettext -k_:1 -kN_:1 -kN_:1,2 -o $(MESSAGESPOT) $(TRANSLATABLE_SOURCE) $(UIFILES_H) $(BINFILE)
115 ##########################################################################
117 install-git-menuitem:
118 doc/dev/install-desktopentry.sh
120 remove-git-menuitem:
121 doc/dev/install-desktopentry.sh --remove
123 gpodder-icon-theme:
124 rm -rf $(GPODDER_ICON_THEME)
125 mkdir -p $(GPODDER_ICON_THEME)
126 python doc/dev/icon-theme/list-icon-names.py >$(GPODDER_ICON_THEME)/names
127 (cd $(GPODDER_ICON_THEME) && \
128 python ../../doc/dev/icon-theme/pack-icons.py && \
129 python ../../doc/dev/icon-theme/create-index.py >index.theme && \
130 rm -f names)
132 ##########################################################################
134 clean:
135 python setup.py clean
136 find src/ -name '*.pyc' -exec rm '{}' \;
137 find src/ -name '*.pyo' -exec rm '{}' \;
138 rm -f MANIFEST PKG-INFO $(UIFILES_H) data/messages.pot~ data/gpodder-??x??.png .coverage $(GPODDER_SERVICE_FILE)
139 rm -rf build
140 make -C data/po clean
142 debclean:
143 fakeroot debian/rules clean
145 distclean: clean
146 rm -rf dist
148 ##########################################################################
150 .PHONY: all test unittest release releasetest install manpage clean distclean messages help install-git-menuitem remove-git-menuitem
152 ##########################################################################