]> sjero.net Git - wget/blob - doc/Makefile.in
[svn] Initial revision
[wget] / doc / Makefile.in
1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997 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 2 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, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 #
19 # Version: @VERSION@
20 #
21
22 SHELL = /bin/sh
23
24 # Program to format Texinfo source into Info files.
25 MAKEINFO = @MAKEINFO@
26 # Program to format Texinfo source into DVI files.
27 TEXI2DVI = texi2dvi
28 # Program to convert DVI files to PostScript
29 DVIPS = dvips -D 300
30 # Program to convert texinfo files to html
31 TEXI2HTML = texi2html -expandinfo -split_chapter
32
33 top_srcdir = @top_srcdir@
34 srcdir     = @srcdir@
35 VPATH      = @srcdir@
36
37 prefix     = @prefix@
38 infodir    = @infodir@
39 mandir     = @mandir@
40 manext     = 1
41 sysconfdir = @sysconfdir@
42
43 INSTALL      = @INSTALL@
44 INSTALL_DATA = @INSTALL_DATA@
45 RM = rm -f
46
47 MAN        = wget.$(manext)
48 WGETRC     = $(sysconfdir)/wgetrc
49
50 #
51 # Dependencies for building
52 #
53
54 all: wget.info # wget.cat
55
56 everything: all wget_us.ps wget_a4.ps wget_toc.html
57
58 wget.info: wget.texi
59         -$(MAKEINFO)
60
61 #wget.cat: $(MAN)
62 #       nroff -man $(srcdir)/$(MAN) > wget.cat
63
64 dvi: wget.dvi
65
66 wget.dvi: wget.texi
67         $(TEXI2DVI) $(srcdir)/wget.texi
68
69 wget_us.ps: wget.dvi
70         $(DVIPS) -t letter -o $@ wget.dvi
71
72 wget_a4.ps: wget.dvi
73         $(DVIPS) -t a4 -o $@ wget.dvi
74
75 wget_toc.html: wget.texi
76         $(TEXI2HTML) $(srcdir)/wget.texi
77
78 #
79 # Dependencies for installing
80 #
81
82 # install all the documentation
83 install: install.info install.wgetrc # install.man
84
85 # uninstall all the documentation
86 uninstall: uninstall.info # uninstall.man
87
88 # install info pages, creating install directory if necessary
89 install.info: wget.info
90         $(top_srcdir)/mkinstalldirs $(infodir)
91         -for file in $(srcdir)/wget.info $(srcdir)/wget.info-*[0-9]; do \
92            test -f "$$file" && $(INSTALL_DATA) $$file $(infodir) ; \
93         done
94
95 # install man page, creating install directory if necessary
96 #install.man:
97 #       $(top_srcdir)/mkinstalldirs $(mandir)/man$(manext)
98 #       $(INSTALL_DATA) $(srcdir)/$(MAN) $(mandir)/man$(manext)/$(MAN)
99
100 # install sample.wgetrc
101 install.wgetrc:
102         $(top_srcdir)/mkinstalldirs $(sysconfdir)
103         @if test -f $(WGETRC); then \
104           if cmp -s $(srcdir)/sample.wgetrc $(WGETRC); then echo ""; \
105              else \
106              echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new'; \
107              $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new; \
108              echo "WARNING: File \`$(WGETRC)' already exists and is spared."; \
109              echo "         You might want to consider \`$(WGETRC).new',"; \
110              echo "         and merge both into \`$(WGETRC)', for the best."; \
111           fi; \
112         else \
113           $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC); \
114         fi
115
116 # uninstall info pages
117 uninstall.info:
118         $(RM) $(infodir)/wget.info*
119
120 # uninstall man page
121 #uninstall.man:
122 #       $(RM) $(mandir)/man$(manext)/$(MAN)
123
124 #
125 # Dependencies for cleanup
126 #
127
128 clean:
129         $(RM) *~ *.bak *.cat *.html
130         $(RM) *.dvi *.aux *.cp *.cps *.fn *.toc *.tp *.vr *.ps *.ky *.pg *.log
131
132 distclean: clean
133         $(RM) Makefile
134
135 realclean: distclean
136         $(RM) wget.info*
137
138 #
139 # Dependencies for maintenance
140 #
141
142 subdir = doc
143
144 Makefile: Makefile.in ../config.status
145         cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status