1#***************************************************************************
2#                                  _   _ ____  _
3#  Project                     ___| | | |  _ \| |
4#                             / __| | | | |_) | |
5#                            | (__| |_| |  _ <| |___
6#                             \___|\___/|_| \_\_____|
7#
8# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
9#
10# This software is licensed as described in the file COPYING, which
11# you should have received as part of this distribution. The terms
12# are also available at http://curl.haxx.se/docs/copyright.html.
13#
14# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15# copies of the Software, and permit persons to whom the Software is
16# furnished to do so, under the terms of the COPYING file.
17#
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
20#
21###########################################################################
22
23HTMLPAGES = testcurl.html runtests.html
24PDFPAGES = testcurl.pdf runtests.pdf
25
26EXTRA_DIST = ftpserver.pl httpserver.pl secureserver.pl runtests.pl getpart.pm \
27 FILEFORMAT README stunnel.pem memanalyze.pl testcurl.pl valgrind.pm ftp.pm   \
28 sshserver.pl sshhelp.pm testcurl.1 runtests.1 $(HTMLPAGES) $(PDFPAGES) \
29 CMakeLists.txt certs/scripts/*.sh certs/Server* certs/EdelCurlRoot* \
30 serverhelp.pm tftpserver.pl rtspserver.pl directories.pm symbol-scan.pl \
31 certs/srp-verifier-conf certs/srp-verifier-db
32
33if BUILD_UNITTESTS
34BUILD_UNIT = unit
35else
36BUILD_UNIT =
37endif
38
39SUBDIRS = data server libtest $(BUILD_UNIT)
40DIST_SUBDIRS = $(SUBDIRS) unit
41
42PERLFLAGS = -I$(srcdir)
43
44CLEANFILES = .http.pid .https.pid .ftp.pid .ftps.pid
45
46MAN2HTML= roffit < $< >$@
47
48curl:
49	@cd $(top_builddir) && $(MAKE)
50
51if CROSSCOMPILING
52TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
53TEST_Q =
54TEST_F =
55TEST_T =
56else # if not cross-compiling:
57TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
58TEST_Q = -a -s
59TEST_F = -a -p -r
60TEST_T = -a -t
61endif
62
63test: all
64	$(TEST)
65
66quiet-test: all
67	$(TEST) $(TEST_Q)
68
69full-test: all
70	$(TEST) $(TEST_F)
71
72torture-test: all
73	$(TEST) $(TEST_T)
74
75.1.html:
76	$(MAN2HTML)
77
78.1.pdf:
79	@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
80	groff -Tps -man $< >$$foo.ps; \
81	ps2pdf $$foo.ps $@; \
82	rm $$foo.ps; \
83	echo "converted $< to $@")
84