]> git.meshlink.io Git - catta/blob - avahi-python/avahi/Makefile.am
907c5eb133c0e23f26374381bf2a528b561b1393
[catta] / avahi-python / avahi / Makefile.am
1 # This file is part of avahi.
2 #
3 # avahi is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU Lesser General Public License as
5 # published by the Free Software Foundation; either version 2 of the
6 # License, or (at your option) any later version.
7 #
8 # avahi is distributed in the hope that it will be useful, but WITHOUT
9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
11 # License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with avahi; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
16 # USA.
17
18 EXTRA_DIST = __init__.py ServiceTypeDatabase.py.in
19
20 if HAVE_PYTHON
21
22 avahidir = $(pythondir)/avahi
23
24
25 if HAVE_GDBM
26 nodist_avahi_SCRIPTS = ServiceTypeDatabase.py
27
28 ServiceTypeDatabase.py: ServiceTypeDatabase.py.in
29         $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
30                 -e 's,@DBM\@,gdbm,g' \
31                 -e 's,@FIRST_KEY\@,key = self.db.firstkey(),g' \
32                 -e 's,@CHECK_KEY\@,while key is not None:,g' \
33                 -e 's,@NEXT_KEY\@,key = self.db.nextkey(key),g' \
34                 -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ && \
35         chmod +x $@
36 endif
37
38 if HAVE_DBM
39 nodist_avahi_SCRIPTS = ServiceTypeDatabase.py
40
41 ServiceTypeDatabase.py: ServiceTypeDatabase.py.in
42         $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
43                 -e 's,@DBM\@,dbm,g' \
44                 -e 's,@FIRST_KEY\@,keys = self.db.keys(),g' \
45                 -e 's,@CHECK_KEY\@,for key in keys:,g' \
46                 -e 's,@NEXT_KEY\@,,g' \
47                 -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ && \
48         chmod +x $@
49 endif
50
51 avahi_PYTHON = $(avahi_SCRIPTS)
52
53 if HAVE_PYTHON_DBUS
54
55 avahi_PYTHON += __init__.py
56
57 endif
58 endif
59
60 CLEANFILES=*.pyc *.pyo ServiceTypeDatabase.py