]> sjero.net Git - wget/blob - tests/Makefile.in
Updated licensing exception for OpenSSL from the SFLC.
[wget] / tests / Makefile.in
1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3 # 2004, 2005, 2006, 2007 Free 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 Wget.  If not, see <http://www.gnu.org/licenses/>.
17
18 # Additional permission under GNU GPL version 3 section 7
19
20 # If you modify this program, or any covered work, by linking or
21 # combining it with the OpenSSL project's OpenSSL library (or a
22 # modified version of that library), containing parts covered by the
23 # terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
24 # grants you additional permission to convey the resulting work.
25 # Corresponding Source for a non-source form of such a combination
26 # shall include the source code for the parts of OpenSSL used as well
27 # as that of the covered work.
28
29 #
30 # Version: @VERSION@
31 #
32
33 SHELL = /bin/sh
34
35 top_builddir = ..
36
37 top_srcdir = @top_srcdir@
38 srcdir     = @srcdir@
39 VPATH      = @srcdir@
40
41 prefix       = @prefix@
42 exec_prefix  = @exec_prefix@
43 bindir       = @bindir@
44 sysconfdir   = @sysconfdir@
45 datadir      = @datadir@
46 localedir    = $(datadir)/locale
47
48 DESTDIR      =
49
50 CC       = @CC@
51 CPPFLAGS = @CPPFLAGS@
52 # The following line is losing on some versions of make!
53 DEFS     = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
54 CFLAGS   = @CFLAGS@
55 LDFLAGS  = @LDFLAGS@ 
56 LIBS     = @LIBS@ @LIBSSL@ @LIBGNUTLS@
57 exeext   = @EXEEXT@
58
59 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../src
60
61 COMPILE = $(CC) $(INCLUDES) $(CPPFLAGS) $(DEFS) $(CFLAGS)
62 LINK    = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
63 INSTALL = @INSTALL@
64 INSTALL_PROGRAM = @INSTALL_PROGRAM@
65 RM = rm -f
66 ETAGS = etags
67
68 # Conditional compiles
69 ALLOCA     = @ALLOCA@
70 MD5_OBJ    = @MD5_OBJ@
71 OPIE_OBJ   = @OPIE_OBJ@
72 NTLM_OBJ   = @NTLM_OBJ@
73 SSL_OBJ    = @SSL_OBJ@
74 GETOPT_OBJ = @GETOPT_OBJ@
75
76
77 all:
78
79 .PHONY: test
80
81 test: @top_srcdir@/src/wget run-unit-tests run-px-tests
82
83 @top_srcdir@/src/wget:
84         cd @top_srcdir@ && $(MAKE)
85
86 run-unit-tests: unit-tests$(exeext)
87         ./unit-tests$(exeext)
88
89 run-px-tests: WgetTest.pm
90         ./Test-auth-basic.px && echo && echo
91         ./Test-c-full.px && echo && echo
92         ./Test-c-partial.px && echo && echo
93         ./Test-c.px && echo && echo
94         ./Test-E-k-K.px && echo && echo
95         ./Test-E-k.px && echo && echo
96         ./Test-ftp.px && echo && echo
97         ./Test-HTTP-Content-Disposition-1.px && echo && echo
98         ./Test-HTTP-Content-Disposition-2.px && echo && echo
99         ./Test-HTTP-Content-Disposition.px && echo && echo
100         ./Test-N-current-HTTP-CD.px && echo && echo
101         ./Test-N-current.px && echo && echo
102         ./Test-N-HTTP-Content-Disposition.px && echo && echo
103         ./Test-N--no-content-disposition.px && echo && echo
104         ./Test-N--no-content-disposition-trivial.px && echo && echo
105         ./Test--no-content-disposition.px && echo && echo
106         ./Test--no-content-disposition-trivial.px && echo && echo
107         ./Test-N-old.px && echo && echo
108         ./Test-nonexisting-quiet.px && echo && echo
109         ./Test-noop.px && echo && echo
110         ./Test-np.px && echo && echo
111         ./Test-N.px && echo && echo
112         ./Test-O-HTTP-Content-Disposition.px && echo && echo
113         ./Test-O--no-content-disposition.px && echo && echo
114         ./Test-O--no-content-disposition-trivial.px && echo && echo
115         ./Test-O-nonexisting.px && echo && echo
116         ./Test-O.px && echo && echo
117         ./Test-Restrict-Lowercase.px && echo && echo
118         ./Test-Restrict-Uppercase.px && echo && echo
119         ./Test--spider-fail.px && echo && echo
120         ./Test--spider-HTTP-Content-Disposition.px && echo && echo
121         ./Test--spider--no-content-disposition.px && echo && echo
122         ./Test--spider--no-content-disposition-trivial.px && echo && echo
123         ./Test--spider.px && echo && echo
124         ./Test--spider-r-HTTP-Content-Disposition.px && echo && echo
125         ./Test--spider-r--no-content-disposition.px && echo && echo
126         ./Test--spider-r--no-content-disposition-trivial.px && echo && echo
127         ./Test--spider-r.px && echo && echo
128
129 WgetTest.pm: WgetTest.pm.in @top_srcdir@/config.status
130         cd @top_srcdir@ && ./config.status
131
132 #
133 # Dependencies for test binary
134 #
135
136 TESTOBJ = $(ALLOCA) cmpt.o connect.o convert.o cookies.o              \
137           ftp.o ftp-basic.o ftp-ls.o $(OPIE_OBJ) $(GETOPT_OBJ) hash.o \
138           host.o html-parse.o html-url.o http.o $(NTLM_OBJ) init.o    \
139           log.o main.o $(MD5_OBJ) netrc.o progress.o                  \
140           ptimer.o recur.o res.o retr.o safe-ctype.o snprintf.o       \
141           spider.o $(SSL_OBJ) test.o url.o utils.o version.o xmalloc.o
142
143 # We make object files depend on every header.  Rather than attempt to
144 # track dependencies, everything gets recompiled when a header
145 # changes.  With a program of Wget's size this doesn't waste much
146 # time, and it's a lot safer than attempting to get all the
147 # dependencies right.
148
149 HEADERS = ../src/config-post.h ../src/config.h                 \
150           ../src/connect.h ../src/convert.h ../src/cookies.h   \
151           ../src/ftp.h ../src/gen-md5.h ../src/getopt.h        \
152           ../src/gnu-md5.h ../src/hash.h ../src/host.h         \
153           ../src/html-parse.h ../src/http-ntlm.h ../src/init.h \
154           ../src/log.h ../src/mswindows.h ../src/netrc.h       \
155           ../src/options.h ../src/progress.h                   \
156           ../src/ptimer.h ../src/recur.h ../src/res.h          \
157           ../src/retr.h ../src/safe-ctype.h ../src/spider.h    \
158           ../src/ssl.h ../src/sysdep.h ../src/test.h           \
159           ../src/url.h ../src/utils.h ../src/wget.h            \
160           ../src/xmalloc.h
161
162 alloca.o: ../src/alloca.c $(HEADERS)
163         $(COMPILE) -DTESTING -c $<
164
165 ccache.o: ../src/ccache.c $(HEADERS)
166         $(COMPILE) -DTESTING -c $<
167
168 cmpt.o: ../src/cmpt.c $(HEADERS)
169         $(COMPILE) -DTESTING -c $<
170
171 connect.o: ../src/connect.c $(HEADERS)
172         $(COMPILE) -DTESTING -c $<
173
174 convert.o: ../src/convert.c $(HEADERS)
175         $(COMPILE) -DTESTING -c $<
176
177 cookies.o: ../src/cookies.c $(HEADERS)
178         $(COMPILE) -DTESTING -c $<
179
180 ftp-basic.o: ../src/ftp-basic.c $(HEADERS)
181         $(COMPILE) -DTESTING -c $<
182
183 ftp.o: ../src/ftp.c $(HEADERS)
184         $(COMPILE) -DTESTING -c $<
185
186 ftp-ls.o: ../src/ftp-ls.c $(HEADERS)
187         $(COMPILE) -DTESTING -c $<
188
189 ftp-opie.o: ../src/ftp-opie.c $(HEADERS)
190         $(COMPILE) -DTESTING -c $<
191
192 gen-md5.o: ../src/gen-md5.c $(HEADERS)
193         $(COMPILE) -DTESTING -c $<
194
195 getopt.o: ../src/getopt.c $(HEADERS)
196         $(COMPILE) -DTESTING -c $<
197
198 gnu-md5.o: ../src/gnu-md5.c $(HEADERS)
199         $(COMPILE) -DTESTING -c $<
200
201 gnutls.o: ../src/gnutls.c $(HEADERS)
202         $(COMPILE) -DTESTING -c $<
203
204 hash.o: ../src/hash.c $(HEADERS)
205         $(COMPILE) -DTESTING -c $<
206
207 host.o: ../src/host.c $(HEADERS)
208         $(COMPILE) -DTESTING -c $<
209
210 html-parse.o: ../src/html-parse.c $(HEADERS)
211         $(COMPILE) -DTESTING -c $<
212
213 html-url.o: ../src/html-url.c $(HEADERS)
214         $(COMPILE) -DTESTING -c $<
215
216 http.o: ../src/http.c $(HEADERS)
217         $(COMPILE) -DTESTING -c $<
218
219 http-ntlm.o: ../src/http-ntlm.c $(HEADERS)
220         $(COMPILE) -DTESTING -c $<
221
222 init.o: ../src/init.c $(HEADERS)
223         $(COMPILE) -DTESTING -c $<
224
225 log.o: ../src/log.c $(HEADERS)
226         $(COMPILE) -DTESTING -c $<
227
228 main.o: ../src/main.c $(HEADERS)
229         $(COMPILE) -DTESTING -c $<
230
231 mswindows.o: ../src/mswindows.c $(HEADERS)
232         $(COMPILE) -DTESTING -c $<
233
234 netrc.o: ../src/netrc.c $(HEADERS)
235         $(COMPILE) -DTESTING -c $<
236
237 openssl.o: ../src/openssl.c $(HEADERS)
238         $(COMPILE) -DTESTING -c $<
239
240 progress.o: ../src/progress.c $(HEADERS)
241         $(COMPILE) -DTESTING -c $<
242
243 protocol.o: ../src/protocol.c $(HEADERS)
244         $(COMPILE) -DTESTING -c $<
245
246 ptimer.o: ../src/ptimer.c $(HEADERS)
247         $(COMPILE) -DTESTING -c $<
248
249 recur.o: ../src/recur.c $(HEADERS)
250         $(COMPILE) -DTESTING -c $<
251
252 res.o: ../src/res.c $(HEADERS)
253         $(COMPILE) -DTESTING -c $<
254
255 retr.o: ../src/retr.c $(HEADERS)
256         $(COMPILE) -DTESTING -c $<
257
258 safe-ctype.o: ../src/safe-ctype.c $(HEADERS)
259         $(COMPILE) -DTESTING -c $<
260
261 snprintf.o: ../src/snprintf.c $(HEADERS)
262         $(COMPILE) -DTESTING -c $<
263
264 spider.o: ../src/spider.c $(HEADERS)
265         $(COMPILE) -DTESTING -c $<
266
267 test.o: ../src/test.c $(HEADERS)
268         $(COMPILE) -DTESTING -c $<
269
270 url.o: ../src/url.c $(HEADERS)
271         $(COMPILE) -DTESTING -c $<
272
273 utils.o: ../src/utils.c $(HEADERS)
274         $(COMPILE) -DTESTING -c $<
275
276 version.o: ../src/version.c $(HEADERS)
277         $(COMPILE) -DTESTING -c $<
278
279 xmalloc.o: ../src/xmalloc.c $(HEADERS)
280         $(COMPILE) -DTESTING -c $<
281
282         
283 unit-tests$(exeext): $(TESTOBJ)
284         $(LINK) $(TESTOBJ) $(LIBS)
285
286 #
287 # Dependencies for cleanup
288 #
289
290 clean:
291         $(RM) *.o unit-tests$(exeext) *~ *.bak core core.[0-9]*
292
293 distclean: clean
294         $(RM) Makefile
295
296 realclean: distclean
297
298 #
299 # Dependencies for maintenance
300 #
301
302 subdir = tests
303
304 Makefile: Makefile.in ../config.status
305         cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
306