Makefile.am 3.7 KB

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