]> sjero.net Git - wget/blob - doc/Makefile.in
[svn] Minor fixes: use $(srcdir) in sample.wgetrc.munged_for_texi_inclusion;
[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 sample.wgetrc.munged_for_texi_inclusion: sample.wgetrc
59         sed s/@/@@/g $(srcdir)/sample.wgetrc > sample.wgetrc.munged_for_texi_inclusion
60
61 wget.info: sample.wgetrc.munged_for_texi_inclusion wget.texi
62         -$(MAKEINFO)
63
64 #wget.cat: $(MAN)
65 #       nroff -man $(srcdir)/$(MAN) > wget.cat
66
67 dvi: wget.dvi
68
69 wget.dvi: wget.texi
70         $(TEXI2DVI) $(srcdir)/wget.texi
71
72 wget_us.ps: wget.dvi
73         $(DVIPS) -t letter -o $@ wget.dvi
74
75 wget_a4.ps: wget.dvi
76         $(DVIPS) -t a4 -o $@ wget.dvi
77
78 wget_toc.html: wget.texi
79         $(TEXI2HTML) $(srcdir)/wget.texi
80
81 #
82 # Dependencies for installing
83 #
84
85 # install all the documentation
86 install: install.info install.wgetrc # install.man
87
88 # uninstall all the documentation
89 uninstall: uninstall.info # uninstall.man
90
91 # install info pages, creating install directory if necessary
92 install.info: wget.info
93         $(top_srcdir)/mkinstalldirs $(infodir)
94         -for file in $(srcdir)/wget.info $(srcdir)/wget.info-*[0-9]; do \
95            test -f "$$file" && $(INSTALL_DATA) $$file $(infodir) ; \
96         done
97
98 # install man page, creating install directory if necessary
99 #install.man:
100 #       $(top_srcdir)/mkinstalldirs $(mandir)/man$(manext)
101 #       $(INSTALL_DATA) $(srcdir)/$(MAN) $(mandir)/man$(manext)/$(MAN)
102
103 # install sample.wgetrc
104 install.wgetrc:
105         $(top_srcdir)/mkinstalldirs $(sysconfdir)
106         @if test -f $(WGETRC); then \
107           if cmp -s $(srcdir)/sample.wgetrc $(WGETRC); then echo ""; \
108              else \
109              echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new'; \
110              $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new; \
111              echo; \
112              echo "WARNING: Differing \`$(WGETRC)'"; \
113              echo "         exists and has been spared.  You might want to"; \
114              echo "         consider merging in the new lines from"; \
115              echo "         \`$(WGETRC).new'."; \
116              echo; \
117              echo "<Hit RETURN to acknowledge>\c"; \
118              read user_input; \
119              echo; \
120           fi; \
121         else \
122           $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC); \
123         fi
124
125 # uninstall info pages
126 uninstall.info:
127         $(RM) $(infodir)/wget.info*
128
129 # uninstall man page
130 #uninstall.man:
131 #       $(RM) $(mandir)/man$(manext)/$(MAN)
132
133 #
134 # Dependencies for cleanup
135 #
136
137 clean:
138         $(RM) *~ *.bak *.cat *.html
139         $(RM) *.dvi *.aux *.cp *.cps *.fn *.toc *.tp *.vr *.ps *.ky *.pg *.log
140
141 distclean: clean
142         $(RM) Makefile sample.wgetrc.munged_for_texi_inclusion
143
144 realclean: distclean
145         $(RM) wget.info*
146
147 #
148 # Dependencies for maintenance
149 #
150
151 subdir = doc
152
153 Makefile: Makefile.in ../config.status
154         cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status