]> sjero.net Git - wget/blob - doc/Makefile.am
Explicit rules to build en@{quot,boldquot}.po.
[wget] / doc / Makefile.am
1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997, 2007, 2008 Free Software Foundation, Inc.
3
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 #
18 # Version: @VERSION@
19 #
20
21 # Program to convert DVI files to PostScript
22 DVIPS = dvips -D 300
23 # Program to convert texinfo files to html
24 TEXI2HTML = texi2html -expandinfo -split_chapter
25
26 manext     = 1
27 RM = rm -f
28
29 TEXI2POD     = $(srcdir)/texi2pod.pl
30 POD2MAN      = @POD2MAN@
31 MAN          = wget.$(manext)
32 WGETRC       = $(sysconfdir)/wgetrc
33 SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
34
35 #
36 # Dependencies for building
37 #
38
39 man_MANS = $(MAN)
40
41 all: wget.info @COMMENT_IF_NO_POD2MAN@$(MAN)
42
43 everything: all wget_us.ps wget_a4.ps wget_toc.html
44
45 $(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
46         sed s/@/@@/g $? > $@
47
48 info_TEXINFOS = wget.texi
49 wget_TEXINFOS = fdl.texi sample.wgetrc.munged_for_texi_inclusion
50
51 EXTRA_DIST = sample.wgetrc \
52              $(SAMPLERCTEXI) \
53              texi2pod.pl
54
55 wget.pod: $(srcdir)/wget.texi version.texi
56         $(TEXI2POD) $(srcdir)/wget.texi $@
57
58 $(MAN): wget.pod
59         $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $? > $@
60
61 #wget.cat: $(MAN)
62 #       nroff -man $? > $@
63
64 wget_us.ps: wget.dvi
65         $(DVIPS) -t letter -o $@ wget.dvi
66
67 wget_a4.ps: wget.dvi
68         $(DVIPS) -t a4 -o $@ wget.dvi
69
70 wget_toc.html: $(srcdir)/wget.texi
71         $(TEXI2HTML) $(srcdir)/wget.texi
72
73 #
74 # Dependencies for installing
75 #
76
77 # install all the documentation
78 install-data-local: install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
79
80 # uninstall all the documentation
81 uninstall-local: @COMMENT_IF_NO_POD2MAN@uninstall.man
82
83
84 # install man page, creating install directory if necessary
85 install.man: $(MAN)
86         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext)
87         $(INSTALL_DATA) $(MAN) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
88
89 # install sample.wgetrc
90 install.wgetrc: $(srcdir)/sample.wgetrc
91         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
92         @if test -f $(DESTDIR)$(WGETRC); then \
93           if cmp -s $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); then echo ""; \
94              else \
95              echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new'; \
96              $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new; \
97              echo; \
98              echo "WARNING: Differing \`$(DESTDIR)$(WGETRC)'"; \
99              echo "         exists and has been spared.  You might want to"; \
100              echo "         consider merging in the new lines from"; \
101              echo "         \`$(DESTDIR)$(WGETRC).new'."; \
102              echo; \
103           fi; \
104         else \
105           $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); \
106         fi
107
108 # uninstall man page
109 uninstall.man:
110         $(RM) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
111
112 #
113 # Dependencies for cleanup
114 #
115
116 CLEANFILES = *~ *.bak *.cat *.pod
117 DISTCLEANFILES = $(MAN)