]> sjero.net Git - wget/blob - Makefile.in
[svn] Merge of fix for bugs 20341 and 20410.
[wget] / Makefile.in
1 # Makefile for `Wget' utility
2 # Copyright (C) 1995, 1996, 1997, 2006 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 # In addition, as a special exception, the Free Software Foundation
18 # gives permission to link the code of its release of Wget with the
19 # OpenSSL project's "OpenSSL" library (or with modified versions of it
20 # that use the same license as the "OpenSSL" library), and distribute
21 # the linked executables.  You must obey the GNU General Public License
22 # in all respects for all of the code used other than "OpenSSL".  If you
23 # modify this file, you may extend this exception to your version of the
24 # file, but you are not obligated to do so.  If you do not wish to do
25 # so, delete this exception statement from your version.
26
27 #
28 # Version: @VERSION@
29 #
30
31 SHELL = /bin/sh
32 @SET_MAKE@
33
34 top_builddir = .
35
36 srcdir = @srcdir@
37 VPATH  = @srcdir@
38
39 #
40 # User configuration section
41 #
42
43 #
44 # Install variables
45 #
46 prefix      = @prefix@
47 exec_prefix = @exec_prefix@
48 bindir      = @bindir@
49 infodir     = @infodir@
50 sysconfdir  = @sysconfdir@
51 mandir      = @mandir@
52 manext      = 1
53 localedir   = $(prefix)/share/locale
54
55 CC = @CC@
56 CFLAGS = @CFLAGS@
57 CPPFLAGS = @CPPFLAGS@
58 DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
59 LIBS = @LIBS@ @LIBSSL@ @LIBGNUTLS@
60 LDFLAGS = @LDFLAGS@
61
62 #
63 # End of user configuration section.  There should be no need to change
64 # anything below this line.
65 #
66
67 DISTNAME = wget-@VERSION@
68 RM = rm -f
69
70 # These are used for maintenance only, so they are safe without
71 # special autoconf cruft.
72 FIND = find
73 GZIP = gzip
74 TAR = tar
75
76 # flags passed to recursive makes in subdirectories
77 MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
78 CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
79 DESTDIR='$(DESTDIR)' prefix='$(prefix)' exec_prefix='$(exec_prefix)' \
80 bindir='$(bindir)' infodir='$(infodir)' mandir='$(mandir)' \
81 manext='$(manext)'
82
83 # subdirectories in the distribution
84 SUBDIRS = src doc po tests util windows
85
86 # default target
87 all: src/config.h Makefile $(SUBDIRS)
88
89 unittest: src/config.h Makefile 
90         cd tests && $(MAKE) $(MAKEDEFS) $@
91         
92 check: all
93
94 $(SUBDIRS): FORCE
95         cd $@ && $(MAKE) $(MAKEDEFS)
96
97 # install everything
98 install: install.bin install.info install.wgetrc \
99          install.mo @COMMENT_IF_NO_POD2MAN@install.man
100
101 # install/uninstall the binary
102 install.bin uninstall.bin:
103         cd src && $(MAKE) $(MAKEDEFS) $@
104
105 # install/uninstall the info/man pages
106 install.info uninstall.info install.man uninstall.man install.wgetrc:
107         cd doc && $(MAKE) $(MAKEDEFS) $@
108
109 # Install `.mo' files
110 install.mo:
111         cd po && $(MAKE) $(MAKEDEFS) $@
112
113 # create tag files for Emacs
114 TAGS:
115         cd src && $(MAKE) $@
116
117 dist: $(srcdir)/configure DISTFILES
118         mkdir $(DISTNAME)
119         for d in `$(FIND) . -type d ! -name CVS -a ! -name RCS -print`; do \
120                 if [ "$$d" != "." -a "$$d" != "./$(DISTNAME)" ]; then \
121                         mkdir $(DISTNAME)/$$d; \
122                 fi; \
123         done
124         for f in `cat DISTFILES`; do \
125                 ln $(srcdir)/$$f $(DISTNAME)/$$f || \
126                 { echo copying $$f; cp -p $(srcdir)/$$f $(DISTNAME)/$$f ; } \
127         done
128         (cd $(DISTNAME); $(MAKE) distclean)
129         $(TAR) chvf - $(DISTNAME) | $(GZIP) -c --best >$(DISTNAME).tar.gz
130         $(RM) -r $(DISTNAME)
131         $(RM) DISTFILES
132
133 DISTFILES: FORCE
134         rm -rf $(DISTNAME)      
135         (cd $(srcdir); find . ! -type d -print) \
136         | sed '/\/\(CVS\|RCS\)\//d; /$@/d; /\.tar.*/d; s/^.\///; /^\.$$/d;' \
137         | sort | uniq > $@
138
139 #
140 # Cleanup dependencies
141 #
142
143 clean:          clean-recursive         clean-top
144 distclean:      distclean-recursive     distclean-top
145 realclean:      realclean-recursive     realclean-top
146
147 clean-top:
148         $(RM) *~ *.bak $(DISTNAME).tar.gz
149
150 distclean-top: clean-top
151         $(RM) Makefile config.status config.log config.cache libtool stamp-h
152         $(RM) -r autom4te.cache
153
154 realclean-top: distclean-top
155         $(RM) configure
156
157 clean-recursive distclean-recursive realclean-recursive:
158         for subdir in $(SUBDIRS); do \
159            target=`echo $@ | sed s/-recursive//`; \
160            (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
161         done
162
163 #
164 # Dependencies for maintenance
165 #
166
167 $(srcdir)/configure: configure.in
168         cd $(srcdir) && autoconf
169
170 # autoheader might not change config.h.in, so touch a stamp file.
171 $(srcdir)/src/config.h.in: stamp-h.in
172 $(srcdir)/stamp-h.in: configure.in
173         @true; # running autoheader here breaks: cd $(srcdir) && autoheader
174         echo timestamp > $(srcdir)/stamp-h.in
175
176 src/config.h: stamp-h
177 stamp-h: src/config.h.in config.status
178         ./config.status
179
180 Makefile: Makefile.in config.status
181         ./config.status
182
183 config.status: configure
184         ./config.status --recheck
185
186 FORCE: