1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
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.
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.
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.
24 # Program to format Texinfo source into Info files.
26 # Program to format Texinfo source into DVI files.
28 # Program to convert DVI files to PostScript
30 # Program to convert texinfo files to html
31 TEXI2HTML = texi2html -expandinfo -split_chapter
33 top_srcdir = @top_srcdir@
41 sysconfdir = @sysconfdir@
44 INSTALL_DATA = @INSTALL_DATA@
48 WGETRC = $(sysconfdir)/wgetrc
51 # Dependencies for building
54 all: wget.info # wget.cat
56 everything: all wget_us.ps wget_a4.ps wget_toc.html
58 sample.wgetrc.munged_for_texi_inclusion: sample.wgetrc
59 sed s/@/@@/g sample.wgetrc > sample.wgetrc.munged_for_texi_inclusion
61 wget.info: sample.wgetrc.munged_for_texi_inclusion wget.texi
65 # nroff -man $(srcdir)/$(MAN) > wget.cat
70 $(TEXI2DVI) $(srcdir)/wget.texi
73 $(DVIPS) -t letter -o $@ wget.dvi
76 $(DVIPS) -t a4 -o $@ wget.dvi
78 wget_toc.html: wget.texi
79 $(TEXI2HTML) $(srcdir)/wget.texi
82 # Dependencies for installing
85 # install all the documentation
86 install: install.info install.wgetrc # install.man
88 # uninstall all the documentation
89 uninstall: uninstall.info # uninstall.man
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) ; \
98 # install man page, creating install directory if necessary
100 # $(top_srcdir)/mkinstalldirs $(mandir)/man$(manext)
101 # $(INSTALL_DATA) $(srcdir)/$(MAN) $(mandir)/man$(manext)/$(MAN)
103 # install sample.wgetrc
105 $(top_srcdir)/mkinstalldirs $(sysconfdir)
106 @if test -f $(WGETRC); then \
107 if cmp -s $(srcdir)/sample.wgetrc $(WGETRC); then echo ""; \
109 echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new'; \
110 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new; \
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'."; \
117 echo "<Hit RETURN to acknowledge>\c"; \
122 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC); \
125 # uninstall info pages
127 $(RM) $(infodir)/wget.info*
131 # $(RM) $(mandir)/man$(manext)/$(MAN)
134 # Dependencies for cleanup
138 $(RM) *~ *.bak *.cat *.html
139 $(RM) *.dvi *.aux *.cp *.cps *.fn *.toc *.tp *.vr *.ps *.ky *.pg *.log
142 $(RM) Makefile sample.wgetrc.munged_for_texi_inclusion
148 # Dependencies for maintenance
153 Makefile: Makefile.in ../config.status
154 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status