]> sjero.net Git - wget/blob - doc/Makefile.am
Moved Makefile.in's to Makefile.am's, applied Ralf's automake patches.
[wget] / doc / Makefile.am
1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997, 2007 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
50
51 EXTRA_DIST = README.maint sample.wgetrc $(SAMPLERCTEXI) \
52              texi2pod.pl
53
54 wget.pod: $(srcdir)/wget.texi $(srcdir)/version.texi
55         $(TEXI2POD) $(srcdir)/wget.texi $@
56
57 $(MAN): wget.pod
58         $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $? > $@
59
60 #wget.cat: $(MAN)
61 #       nroff -man $? > $@
62
63 wget_us.ps: wget.dvi
64         $(DVIPS) -t letter -o $@ wget.dvi
65
66 wget_a4.ps: wget.dvi
67         $(DVIPS) -t a4 -o $@ wget.dvi
68
69 wget_toc.html: $(srcdir)/wget.texi
70         $(TEXI2HTML) $(srcdir)/wget.texi
71
72 #
73 # Dependencies for installing
74 #
75
76 # install all the documentation
77 install-data-local: install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
78
79 # uninstall all the documentation
80 uninstall-local: @COMMENT_IF_NO_POD2MAN@uninstall.man
81
82
83 # install man page, creating install directory if necessary
84 install.man: $(MAN)
85         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext)
86         $(INSTALL_DATA) $(MAN) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
87
88 # install sample.wgetrc
89 install.wgetrc: $(srcdir)/sample.wgetrc
90         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
91         @if test -f $(DESTDIR)$(WGETRC); then \
92           if cmp -s $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); then echo ""; \
93              else \
94              echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new'; \
95              $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new; \
96              echo; \
97              echo "WARNING: Differing \`$(DESTDIR)$(WGETRC)'"; \
98              echo "         exists and has been spared.  You might want to"; \
99              echo "         consider merging in the new lines from"; \
100              echo "         \`$(DESTDIR)$(WGETRC).new'."; \
101              echo; \
102           fi; \
103         else \
104           $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); \
105         fi
106
107 # uninstall man page
108 uninstall.man:
109         $(RM) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
110
111 #
112 # Dependencies for cleanup
113 #
114
115 CLEANFILES = *~ *.bak *.cat *.pod
116 DISTCLEANFILES = $(MAN)
117
118 realclean: distclean
119         $(RM) wget.info*
120         $(RM) $(SAMPLERCTEXI)