Merge tag 'upstream/0.8' into tizen
[platform/upstream/avahi.git] / avahi-python / avahi-discover / 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 AM_CFLAGS=-I$(top_srcdir)
19
20 EXTRA_DIST = \
21         avahi-discover.py \
22         avahi-discover.desktop.in.in
23
24 if HAVE_PYTHON
25 if HAVE_PYTHON_DBUS
26 if HAVE_PYGOBJECT
27
28 pythonscripts =
29
30 desktopdir = $(datadir)/applications
31 desktop_DATA =
32
33 if HAVE_GDBM
34 pythonscripts += \
35         avahi-discover
36 desktop_DATA += avahi-discover.desktop
37 endif
38
39 if HAVE_DBM
40 pythonscripts += \
41         avahi-discover
42 desktop_DATA += avahi-discover.desktop
43 endif
44
45 avahi-discover.desktop.in: avahi-discover.desktop.in.in
46         $(AM_V_GEN)sed -e 's,@bindir\@,$(bindir),g' $< > $@
47
48 avahi-discover.desktop: avahi-discover.desktop.in
49         $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
50
51 avahi-discover: avahi-discover.py
52         $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
53                 -e 's,@GETTEXT_PACKAGE\@,"$(GETTEXT_PACKAGE)",g' \
54                 -e 's,@LOCALEDIR\@,"$(avahilocaledir)",g' \
55                 -e 's,@interfacesdir\@,$(interfacesdir),g' $< > $@ && \
56         chmod +x $@
57
58 bin_SCRIPTS = $(pythonscripts)
59
60 CLEANFILES = $(pythonscripts) $(desktop_DATA) *.pyc *.pyo avahi-discover.desktop.in
61
62 endif
63 endif
64 endif