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