]> git.meshlink.io Git - catta/blob - man/Makefile.am
3b90835e33f507625788f56b7544a732b3919e54
[catta] / man / Makefile.am
1 # $Id$
2
3 # This file is part of avahi.
4 #
5 # avahi is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as
7 # published by the Free Software Foundation; either version 2 of the
8 # License, or (at your option) any later version.
9 #
10 # avahi is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13 # License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with avahi; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 # USA.
19
20 pkgsysconfdir=$(sysconfdir)/avahi
21 servicedir=$(pkgsysconfdir)/services
22
23 if BUILD_MANPAGES
24
25 man_MANS = \
26         avahi-daemon.8 \
27         avahi-dnsconfd.8 \
28         avahi-daemon.conf.5 \
29         avahi-dnsconfd.action.8 \
30         avahi.service.5 \
31         avahi.hosts.5
32
33 noinst_DATA = \
34         avahi-browse.1.xml \
35         avahi-publish.1.xml \
36         avahi-resolve.1.xml \
37         avahi-daemon.8.xml \
38         avahi-discover.1.xml \
39         avahi-bookmarks.1.xml \
40         avahi-dnsconfd.8.xml \
41         avahi-daemon.conf.5.xml \
42         avahi-dnsconfd.action.8.xml \
43         avahi.service.5.xml \
44         avahi.hosts.5.xml
45
46 CLEANFILES = \
47         $(noinst_DATA)
48
49 if HAVE_DBUS
50
51 man_MANS += \
52         avahi-browse.1 \
53         avahi-resolve.1 \
54         avahi-publish.1
55
56 if HAVE_PYTHON
57 man_MANS += \
58         avahi-discover.1 \
59         avahi-bookmarks.1
60 endif
61 endif
62
63 avahi-browse.1.xml: avahi-browse.1.xml.in Makefile
64         sed -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
65         -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
66
67 avahi-publish.1.xml: avahi-publish.1.xml.in Makefile
68         sed     -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
69         -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
70
71 avahi-resolve.1.xml: avahi-resolve.1.xml.in Makefile
72         sed     -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
73         -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
74
75 avahi-daemon.8.xml: avahi-daemon.8.xml.in Makefile
76         sed -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
77                 -e 's,@servicedir\@,$(servicedir),g' \
78                 -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
79         -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
80
81 avahi-discover.1.xml: avahi-discover.1.xml.in Makefile
82         sed     -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
83         -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
84
85 avahi-bookmarks.1.xml: avahi-bookmarks.1.xml.in Makefile
86         sed     -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
87         -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
88
89 avahi-dnsconfd.8.xml: avahi-dnsconfd.8.xml.in Makefile
90         sed     -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
91                 -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
92         -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
93
94 avahi-daemon.conf.5.xml: avahi-daemon.conf.5.xml.in Makefile
95         sed     -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
96                 -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
97         -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
98
99 avahi-dnsconfd.action.8.xml: avahi-dnsconfd.action.8.xml.in Makefile
100         sed     -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
101                 -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
102         -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
103
104 avahi.service.5.xml: avahi.service.5.xml.in Makefile
105         sed     -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
106                 -e 's,@servicedir\@,$(servicedir),g' \
107                 -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
108         -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
109
110 avahi.hosts.5.xml: avahi.hosts.5.xml.in Makefile
111         sed     -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
112                 -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
113         -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
114
115 if USE_XMLTOMAN
116
117 CLEANFILES += $(man_MANS)
118
119 avahi-browse.1: avahi-browse.1.xml Makefile
120         xmltoman $< > $@
121
122 avahi-publish.1: avahi-publish.1.xml Makefile
123         xmltoman $< > $@
124
125 avahi-resolve.1: avahi-resolve.1.xml Makefile
126         xmltoman $< > $@
127
128 avahi-daemon.8: avahi-daemon.8.xml Makefile
129         xmltoman $< > $@
130
131 avahi-discover.1: avahi-discover.1.xml Makefile
132         xmltoman $< > $@
133
134 avahi-bookmarks.1: avahi-bookmarks.1.xml Makefile
135         xmltoman $< > $@
136
137 avahi-dnsconfd.8: avahi-dnsconfd.8.xml Makefile
138         xmltoman $< > $@
139
140 avahi-daemon.conf.5: avahi-daemon.conf.5.xml Makefile
141         xmltoman $< > $@
142
143 avahi-dnsconfd.action.8: avahi-dnsconfd.action.8.xml Makefile
144         xmltoman $< > $@
145
146 avahi.service.5: avahi.service.5.xml Makefile
147         xmltoman $< > $@
148
149 avahi.hosts.5: avahi.hosts.5.xml Makefile
150         xmltoman $< > $@
151
152 xmllint: $(noinst_DATA)
153         for f in $(noinst_DATA) ; do \
154                         xmllint --noout --valid "$$f" || exit 1 ; \
155         done
156
157 endif
158
159 endif
160
161 EXTRA_DIST = \
162         $(man_MANS) \
163         avahi-browse.1.xml.in \
164         avahi-publish.1.xml.in \
165         avahi-resolve.1.xml.in \
166         avahi-daemon.8.xml.in \
167         avahi-discover.1.xml.in \
168         avahi-bookmarks.1.xml.in \
169         avahi-dnsconfd.8.xml.in \
170         avahi-daemon.conf.5.xml.in \
171         avahi-dnsconfd.action.8.xml.in \
172         avahi.service.5.xml.in \
173         avahi.hosts.5.xml.in \
174         xmltoman.css \
175         xmltoman.xsl \
176         xmltoman.dtd
177
178
179 if HAVE_DBUS
180
181 install-exec-local:
182         mkdir -p $(DESTDIR)/$(mandir)/man1 && \
183                 cd $(DESTDIR)/$(mandir)/man1 && \
184                 rm -f avahi-resolve-host-name.1 avahi-resolve-address.1 avahi-browse-domains.1 avahi-publish-address.1 avahi-publish-service.1 && \
185                 $(LN_S) avahi-resolve.1 avahi-resolve-host-name.1 && \
186                 $(LN_S) avahi-resolve.1 avahi-resolve-address.1 && \
187                 $(LN_S) avahi-browse.1 avahi-browse-domains.1 && \
188                 $(LN_S) avahi-publish.1 avahi-publish-address.1 && \
189                 $(LN_S) avahi-publish.1 avahi-publish-service.1
190
191 endif