Makefile.am 3.6 KB

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