2 # gPodder - A media aggregator and podcast client
3 # Copyright (c) 2005-2011 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 ##########################################################################
23 MESSAGESPOT
=data
/messages.pot
25 UIFILES
=$(wildcard data
/ui
/*.ui \
27 UIFILES_H
=$(subst .ui
,.ui.h
,$(UIFILES
))
28 QMLFILES
=$(wildcard data
/ui
/qml
/*.qml
)
29 TRANSLATABLE_SOURCE
=$(wildcard src
/gpodder
/*.py \
30 src
/gpodder
/gtkui
/*.py \
31 src
/gpodder
/gtkui
/interface
/*.py \
32 src
/gpodder
/gtkui
/desktop
/*.py \
33 src
/gpodder
/qmlui
/*.py \
34 src
/gpodder
/webui
/*.py \
35 src
/gpodder
/plugins
/*.py
)
38 MANPAGE
=data
/man
/gpodder
.1
40 GPODDER_SERVICE_FILE
=data
/org.gpodder.service
41 GPODDER_SERVICE_FILE_IN
=$(addsuffix .in
,$(GPODDER_SERVICE_FILE
))
43 GPODDER_DESKTOP_FILE
=data
/gpodder.desktop
44 GPODDER_DESKTOP_FILE_IN
=$(addsuffix .in
,$(GPODDER_DESKTOP_FILE
))
45 DESKTOPFILE_H
=$(addsuffix .h
,$(GPODDER_DESKTOP_FILE_IN
))
52 ##########################################################################
57 @echo
'make test run gpodder in local directory'
58 @echo
'make qmltest run gpodder (qml ui) in local directory'
59 @echo
'make unittest run doctests + unittests'
60 @echo
'make release create source tarball in "dist/"'
61 @echo
'make releasetest run some tests before the release'
62 @echo
'make install install gpodder into "$(PREFIX)"'
63 @echo
'make manpage update manpage (on release)'
64 @echo
'make messages update messages.pot + .po files + .mo files'
65 @echo
'make clean remove generated+temp+*.py{c,o} files'
66 @echo
'make distclean do a "make clean" + remove "dist/"'
67 @echo
'make headlink print URL for the current Git head'
69 ##########################################################################
72 @
# set xterm title to know what this window does ;)
73 @echo
-ne
'\033]0;gPodder console (make test)\007'
77 @echo
-ne
'\033]0;gPodder/QML console\007'
78 $(BINFILE
) --qml
--verbose
81 PYTHONPATH
=src
/ $(PYTHON
) -m gpodder.unittests
87 $(PYTHON
) setup.py sdist
89 releasetest
: unittest
$(GPODDER_DESKTOP_FILE
)
90 desktop-file-validate
$(GPODDER_DESKTOP_FILE
)
91 make
-C data
/po validate
93 $(GPODDER_SERVICE_FILE
): $(GPODDER_SERVICE_FILE_IN
)
94 sed
-e
's#__PREFIX__#$(PREFIX)#' $< >$@
96 $(GPODDER_DESKTOP_FILE
): $(GPODDER_DESKTOP_FILE_IN
) data
/po
/*.po
97 intltool-merge
-d
-u data
/po
$< $@
99 $(GPODDER_DESKTOP_FILE_IN
).h
: $(GPODDER_DESKTOP_FILE_IN
)
100 intltool-extract
--quiet
--type
=gettext
/ini
$<
102 install: messages
$(GPODDER_SERVICE_FILE
) $(GPODDER_DESKTOP_FILE
)
103 $(PYTHON
) setup.py
install --root
=$(DESTDIR
) --prefix=$(PREFIX
)
105 ##########################################################################
109 $(MANPAGE
): src
/gpodder
/__init__.py
$(BINFILE
)
110 $(HELP2MAN
) --name
="A Media aggregator and Podcast catcher" -N
$(BINFILE
) >$(MANPAGE
)
112 ##########################################################################
114 messages
: $(MESSAGESPOT
)
117 data
/ui
/%.ui.h
: $(UIFILES
)
118 intltool-extract
--quiet
--type
=gettext
/glade
$(subst .ui.h
,.ui
,$@
)
120 $(MESSAGESPOT
): $(TRANSLATABLE_SOURCE
) $(UIFILES_H
) $(QMLFILES
) $(BINFILE
) $(DESKTOPFILE_H
)
121 xgettext
-LPython
-k_
:1 -kN_
:1 -kN_
:1,2 -kn_
:1,2 -o
$(MESSAGESPOT
) $^
123 ##########################################################################
125 # This only works in a Git working commit, and assumes that the local Git
126 # HEAD has already been pushed to the main repository. It's mainly useful
127 # for the gPodder maintainer to quickly generate a commit link that can be
128 # posted online in bug trackers and mailing lists.
131 @echo http
://gpodder.org
/commit
/`git show-ref HEAD | head -c8`
133 ##########################################################################
136 $(PYTHON
) setup.py
clean
137 find src
/ -name
'*.pyc' -exec
rm '{}' \
;
138 find src
/ -name
'*.pyo' -exec
rm '{}' \
;
139 find data
/ui
/ -name
'*.ui.h' -exec
rm '{}' \
;
140 rm -f MANIFEST PKG-INFO data
/messages.pot~
$(DESKTOPFILE_H
)
141 rm -f data
/gpodder-??x??.png .coverage
142 rm -f
$(GPODDER_SERVICE_FILE
) $(GPODDER_DESKTOP_FILE
)
144 make
-C data
/po
clean
147 fakeroot debian
/rules
clean
152 ##########################################################################
154 .PHONY
: all test unittest release releasetest
install manpage
clean distclean messages help headlink
156 ##########################################################################