1#*************************************************************************** 2# _ _ ____ _ 3# Project ___| | | | _ \| | 4# / __| | | | |_) | | 5# | (__| |_| | _ <| |___ 6# \___|\___/|_| \_\_____| 7# 8# Copyright (C) 1998 - 2017, 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 https://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 25MANDISTPAGES = runtests.1.dist testcurl.1.dist 26 27# the path to the impacket python lib used for SMB tests 28IMP = python_dependencies/impacket 29SMBDEPS = $(IMP)/__init__.py $(IMP)/nmb.py $(IMP)/nt_errors.py \ 30 $(IMP)/ntlm.py $(IMP)/smb.py $(IMP)/smb3.py $(IMP)/smb3structs.py \ 31 $(IMP)/smbserver.py $(IMP)/spnego.py $(IMP)/structure.py \ 32 $(IMP)/uuid.py $(IMP)/version.py smbserver.py curl_test_data.py 33 34EXTRA_DIST = ftpserver.pl httpserver.pl secureserver.pl runtests.pl getpart.pm \ 35 FILEFORMAT README stunnel.pem memanalyze.pl testcurl.pl valgrind.pm ftp.pm \ 36 sshserver.pl sshhelp.pm pathhelp.pm testcurl.1 runtests.1 \ 37 serverhelp.pm tftpserver.pl rtspserver.pl directories.pm symbol-scan.pl \ 38 CMakeLists.txt mem-include-scan.pl valgrind.supp http_pipe.py extern-scan.pl \ 39 manpage-scan.pl nroff-scan.pl http2-server.pl dictserver.py \ 40 negtelnetserver.py $(SMBDEPS) 41 42DISTCLEANFILES = configurehelp.pm 43 44# we have two variables here to make sure DIST_SUBDIRS won't get 'unit' 45# added twice as then targets such as 'distclean' misbehave and try to 46# do things twice in that subdir at times (and thus fails). 47if BUILD_UNITTESTS 48BUILD_UNIT = unit 49DIST_UNIT = 50else 51BUILD_UNIT = 52DIST_UNIT = unit 53endif 54 55SUBDIRS = certs data server libtest $(BUILD_UNIT) 56DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT) 57 58PERLFLAGS = -I$(srcdir) 59 60CLEANFILES = .http.pid .https.pid .ftp.pid .ftps.pid $(MANDISTPAGES) 61 62MAN2HTML= roffit $< >$@ 63 64curl: 65 @cd $(top_builddir) && $(MAKE) 66 67if CROSSCOMPILING 68TEST = @echo "NOTICE: we can't run the tests when cross-compiling!" 69else # if not cross-compiling: 70TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl 71TEST_Q = -a -s 72TEST_AM = -a -am 73TEST_F = -a -p -r 74TEST_T = -a -t 75TEST_E = -a -e 76 77# !flaky means that it'll skip all tests using the flaky keyword 78TEST_NF = -a -p -r !flaky 79endif 80 81# make sure that PERL is pointing to an executable 82perlcheck: 83 @if ! test -x "$(PERL)"; then echo "No perl!"; exit 2; fi 84 85test: perlcheck all 86 $(TEST) $(TFLAGS) 87 88quiet-test: perlcheck all 89 $(TEST) $(TEST_Q) $(TFLAGS) 90 91am-test: perlcheck all 92 $(TEST) $(TEST_AM) $(TFLAGS) 93 94full-test: perlcheck all 95 $(TEST) $(TEST_F) $(TFLAGS) 96 97nonflaky-test: perlcheck all 98 $(TEST) $(TEST_NF) $(TFLAGS) 99 100torture-test: perlcheck all 101 $(TEST) $(TEST_T) $(TFLAGS) 102 103event-test: perlcheck all 104 $(TEST) $(TEST_E) $(TFLAGS) 105 106.1.html: 107 $(MAN2HTML) 108 109.1.pdf: 110 @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \ 111 groff -Tps -man $< >$$foo.ps; \ 112 ps2pdf $$foo.ps $@; \ 113 rm $$foo.ps; \ 114 echo "converted $< to $@") 115 116checksrc: 117 cd libtest && $(MAKE) checksrc 118 cd unit && $(MAKE) checksrc 119 cd server && $(MAKE) checksrc 120 121if CURLDEBUG 122# for debug builds, we scan the sources on all regular make invokes 123all-local: checksrc 124endif 125