Makefile.am 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. AUTOMAKE_OPTIONS = foreign no-dependencies
  23. # EXTRA_DIST breaks with $(abs_builddir) so build it using this variable
  24. # but distribute it (using the relative file name) in the next variable
  25. man_MANS = $(abs_builddir)/curl.1
  26. noinst_man_MANS = curl.1 mk-ca-bundle.1
  27. dist_man_MANS = curl-config.1
  28. GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
  29. PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
  30. MANDISTPAGES = curl.1.dist curl-config.1.dist
  31. HTMLPAGES = $(GENHTMLPAGES) index.html
  32. # Build targets in this file (.) before cmdline-opts to ensure that
  33. # the curl.1 rule below runs first
  34. SUBDIRS = . cmdline-opts
  35. DIST_SUBDIRS = $(SUBDIRS) examples libcurl
  36. CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) $(MANDISTPAGES) curl.1
  37. EXTRA_DIST = MANUAL BUGS CONTRIBUTE.md FAQ FEATURES INTERNALS.md SSLCERTS.md \
  38. README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS KNOWN_BUGS \
  39. BINDINGS.md HISTORY.md INSTALL INSTALL.md LICENSE-MIXING.md \
  40. README.netware MAIL-ETIQUETTE HTTP-COOKIES.md SECURITY.md RELEASE-PROCEDURE \
  41. SSL-PROBLEMS.md HTTP2.md ROADMAP.md CODE_OF_CONDUCT.md CODE_STYLE.md \
  42. CHECKSRC.md CMakeLists.txt README.md CIPHERS.md INSTALL.cmake README.cmake \
  43. $(noinst_man_MANS) HELP-US.md
  44. MAN2HTML= roffit $< >$@
  45. SUFFIXES = .1 .html .pdf
  46. # $(abs_builddir) is to disable VPATH when searching for this file, which
  47. # would otherwise find the copy in $(srcdir) which breaks the $(HUGE)
  48. # rule in src/Makefile.am in out-of-tree builds that references the file in the
  49. # build directory.
  50. #
  51. # First, seed the used copy of curl.1 with the prebuilt copy (in an out-of-tree
  52. # build), then run make recursively to rebuild it only if its dependencies
  53. # have changed.
  54. $(abs_builddir)/curl.1:
  55. if test "$(top_builddir)x" != "$(top_srcdir)x" -a -e "$(srcdir)/curl.1"; then \
  56. cp -fp "$(srcdir)/curl.1" $@; fi
  57. cd cmdline-opts && $(MAKE)
  58. html: $(HTMLPAGES)
  59. cd libcurl && $(MAKE) html
  60. pdf: $(PDFPAGES)
  61. cd libcurl && $(MAKE) pdf
  62. .1.html:
  63. $(MAN2HTML)
  64. .1.pdf:
  65. @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
  66. groff -Tps -man $< >$$foo.ps; \
  67. ps2pdf $$foo.ps $@; \
  68. rm $$foo.ps; \
  69. echo "converted $< to $@")
  70. distclean:
  71. rm -f $(CLEANFILES)