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