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