Makefile.am 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 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.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. # SPDX-License-Identifier: curl
  22. #
  23. ###########################################################################
  24. HTMLPAGES = testcurl.html runtests.html
  25. PDFPAGES = testcurl.pdf runtests.pdf
  26. MANDISTPAGES = runtests.1.dist testcurl.1.dist
  27. EXTRA_DIST = appveyor.pm azure.pm badsymbols.pl check-deprecated.pl CMakeLists.txt \
  28. devtest.pl dictserver.py directories.pm disable-scan.pl error-codes.pl extern-scan.pl FILEFORMAT.md \
  29. processhelp.pm ftpserver.pl getpart.pm globalconfig.pm http-server.pl http2-server.pl \
  30. http3-server.pl manpage-scan.pl manpage-syntax.pl markdown-uppercase.pl mem-include-scan.pl \
  31. memanalyze.pl negtelnetserver.py nroff-scan.pl option-check.pl options-scan.pl \
  32. pathhelp.pm README.md rtspserver.pl runner.pm runtests.1 runtests.pl secureserver.pl \
  33. serverhelp.pm servers.pm smbserver.py sshhelp.pm sshserver.pl stunnel.pem symbol-scan.pl \
  34. testcurl.1 testcurl.pl testutil.pm tftpserver.pl util.py valgrind.pm \
  35. valgrind.supp version-scan.pl check-translatable-options.pl
  36. DISTCLEANFILES = configurehelp.pm
  37. # we have two variables here to make sure DIST_SUBDIRS won't get 'unit'
  38. # added twice as then targets such as 'distclean' misbehave and try to
  39. # do things twice in that subdir at times (and thus fails).
  40. if BUILD_UNITTESTS
  41. BUILD_UNIT = unit
  42. DIST_UNIT =
  43. else
  44. BUILD_UNIT =
  45. DIST_UNIT = unit
  46. endif
  47. SUBDIRS = certs data server libtest http $(BUILD_UNIT)
  48. DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT)
  49. PERLFLAGS = -I$(srcdir)
  50. CLEANFILES = .http.pid .https.pid .ftp.pid .ftps.pid $(MANDISTPAGES)
  51. MAN2HTML= roffit $< >$@
  52. curl:
  53. @cd $(top_builddir) && $(MAKE)
  54. if CROSSCOMPILING
  55. TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
  56. else # if not cross-compiling:
  57. TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
  58. TEST_Q = -a -s
  59. TEST_AM = -a -am
  60. TEST_F = -a -p -r
  61. TEST_T = -a -t
  62. TEST_E = -a -e
  63. # !flaky means that it'll skip all tests using the flaky keyword
  64. TEST_NF = -a -p !flaky
  65. # special CI target derived from nonflaky with CI-specific flags
  66. TEST_CI = $(TEST_NF) -rm
  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. ci-test: perlcheck all
  78. $(TEST) $(TEST_CI) $(TFLAGS)
  79. full-test: perlcheck all
  80. $(TEST) $(TEST_F) $(TFLAGS)
  81. nonflaky-test: perlcheck all
  82. $(TEST) $(TEST_NF) $(TFLAGS)
  83. torture-test: perlcheck all
  84. $(TEST) $(TEST_T) $(TFLAGS)
  85. event-test: perlcheck all
  86. $(TEST) $(TEST_E) $(TFLAGS)
  87. .1.html:
  88. $(MAN2HTML)
  89. .1.pdf:
  90. @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
  91. groff -Tps -man $< >$$foo.ps; \
  92. ps2pdf $$foo.ps $@; \
  93. rm $$foo.ps; \
  94. echo "converted $< to $@")
  95. checksrc:
  96. cd libtest && $(MAKE) checksrc
  97. cd unit && $(MAKE) checksrc
  98. cd server && $(MAKE) checksrc
  99. cd http && $(MAKE) checksrc
  100. if CURLDEBUG
  101. # for debug builds, we scan the sources on all regular make invokes
  102. all-local: checksrc
  103. endif