Makefile.am 3.3 KB

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