Makefile.am 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1998 - 2022, 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. AUTOMAKE_OPTIONS = foreign no-dependencies
  25. SUBDIRS = opts
  26. include Makefile.inc
  27. man_DISTMANS = $(man_MANS:.3=.3.dist)
  28. HTMLPAGES = $(man_MANS:.3=.html)
  29. PDFPAGES = $(man_MANS:.3=.pdf)
  30. m4macrodir = $(datadir)/aclocal
  31. dist_m4macro_DATA = libcurl.m4
  32. CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS) $(man_DISTMANS) \
  33. libcurl-symbols.3
  34. EXTRA_DIST = $(man_MANS) ABI.md symbols-in-versions symbols.pl \
  35. mksymbolsmanpage.pl CMakeLists.txt
  36. MAN2HTML= roffit --mandir=. $< >$@
  37. SUFFIXES = .3 .html
  38. libcurl-symbols.3: $(srcdir)/symbols-in-versions $(srcdir)/mksymbolsmanpage.pl
  39. perl $(srcdir)/mksymbolsmanpage.pl < $(srcdir)/symbols-in-versions > $@
  40. html: $(HTMLPAGES)
  41. cd opts && $(MAKE) html
  42. .3.html:
  43. $(MAN2HTML)
  44. pdf: $(PDFPAGES)
  45. cd opts && $(MAKE) pdf
  46. .3.pdf:
  47. @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
  48. groff -Tps -man $< >$$foo.ps; \
  49. ps2pdf $$foo.ps $@; \
  50. rm $$foo.ps; \
  51. echo "converted $< to $@")
  52. # Make sure each option man page is referenced in the main man page
  53. TESTS = check-easy check-multi
  54. LOG_COMPILER = $(PERL)
  55. # The test fails if the log file contains any text
  56. AM_LOG_FLAGS = -p -e 'die "$$_" if ($$_);'
  57. check-easy: $(srcdir)/curl_easy_setopt.3 $(srcdir)/opts/CURLOPT*.3
  58. OPTS="$$(ls $(srcdir)/opts/CURLOPT*.3 | $(SED) -e 's,^.*/,,' -e 's,\.3$$,,')" && \
  59. for opt in $$OPTS; do grep "^\.IP $$opt$$" $(srcdir)/curl_easy_setopt.3 >/dev/null || echo Missing $$opt; done > $@
  60. check-multi: $(srcdir)/curl_multi_setopt.3 $(srcdir)/opts/CURLMOPT*.3
  61. OPTS="$$(ls $(srcdir)/opts/CURLMOPT*.3 | $(SED) -e 's,^.*/,,' -e 's,\.3$$,,')" && \
  62. for opt in $$OPTS; do grep "^\.IP $$opt$$" $(srcdir)/curl_multi_setopt.3 >/dev/null || echo Missing $$opt; done > $@