You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.5 KiB

8 years ago
  1. ASCIIDOC = @ASCIIDOC@
  2. ASCIIDOC_EXTRA =
  3. MANPAGE_XSL = manpage-normal.xsl
  4. XMLTO = @XMLTO@
  5. XMLTO_EXTRA = -m manpage-bold-literal.xsl
  6. GZIPCMD = @GZIP@
  7. INSTALL = @INSTALL@
  8. RM = @RM@
  9. MV = @MV@
  10. SED = @SED@
  11. VERSION = `$(SED) -n 's/.*PACKAGE_VERSION "\(.*\)"/\1/p'\
  12. ../config.h`
  13. # Guard against environment variables
  14. if ENABLE_DOCUMENTATION
  15. MAN1_DOC =
  16. MAN1_DOC += ss-local.1
  17. MAN1_DOC += ss-manager.1
  18. MAN1_DOC += ss-nat.1
  19. MAN1_DOC += ss-redir.1
  20. MAN1_DOC += ss-server.1
  21. MAN1_DOC += ss-tunnel.1
  22. MAN8_DOC =
  23. MAN8_DOC += shadowsocks-libev.8
  24. else
  25. MAN1_DOC =
  26. MAN8_DOC =
  27. endif
  28. MAN8_XML = $(MAN8_DOC:%.8=%.xml)
  29. MAN1_XML = $(MAN1_DOC:%.1=%.xml)
  30. MAN_XML = $(MAN8_XML) $(MAN1_XML)
  31. MAN8_HTML = $(MAN8_DOC:%.8=%.html)
  32. MAN1_HTML = $(MAN1_DOC:%.1=%.html)
  33. MAN_HTML = $(MAN8_HTML) $(MAN1_HTML)
  34. MAN8_TXT = $(MAN8_DOC:%.8=%.asciidoc)
  35. MAN1_TXT = $(MAN1_DOC:%.1=%.asciidoc)
  36. MAN_TXT = $(MAN8_TXT) $(MAN1_TXT)
  37. man_MANS = $(MAN8_DOC) $(MAN1_DOC)
  38. html-local: $(MAN_HTML)
  39. %.1: %.xml
  40. $(AM_V_GEN)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
  41. %.8: %.xml
  42. $(AM_V_GEN)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
  43. %.xml: %.asciidoc
  44. $(AM_V_GEN)$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
  45. -aversion=$(VERSION) $(ASCIIDOC_EXTRA) -o $@ $<
  46. %.html: %.asciidoc
  47. $(AM_V_GEN)$(ASCIIDOC) -b html4 -d article -f asciidoc.conf \
  48. -aversion=$(VERSION) $(ASCIIDOC_EXTRA) -o $@ $<
  49. doc_DATA = $(MAN_HTML)
  50. CLEANFILES = $(MAN_XML) $(man_MANS) $(MAN_HTML)
  51. EXTRA_DIST = *.asciidoc asciidoc.conf *.xsl