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.

60 lines
1.4 KiB

7 years ago
7 years ago
8 years ago
7 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. MAN1_DOC =
  15. MAN1_DOC += ss-local.1
  16. MAN1_DOC += ss-manager.1
  17. MAN1_DOC += ss-nat.1
  18. MAN1_DOC += ss-redir.1
  19. MAN1_DOC += ss-server.1
  20. MAN1_DOC += ss-tunnel.1
  21. MAN8_DOC =
  22. MAN8_DOC += shadowsocks-libev.8
  23. MAN8_XML = $(MAN8_DOC:%.8=%.xml)
  24. MAN1_XML = $(MAN1_DOC:%.1=%.xml)
  25. MAN_XML = $(MAN8_XML) $(MAN1_XML)
  26. MAN8_HTML = $(MAN8_DOC:%.8=%.html)
  27. MAN1_HTML = $(MAN1_DOC:%.1=%.html)
  28. MAN_HTML = $(MAN8_HTML) $(MAN1_HTML)
  29. MAN8_TXT = $(MAN8_DOC:%.8=%.asciidoc)
  30. MAN1_TXT = $(MAN1_DOC:%.1=%.asciidoc)
  31. MAN_TXT = $(MAN8_TXT) $(MAN1_TXT)
  32. man_MANS = $(MAN8_DOC) $(MAN1_DOC)
  33. html-local: $(MAN_HTML)
  34. %.1: %.xml
  35. $(AM_V_GEN)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
  36. %.8: %.xml
  37. $(AM_V_GEN)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
  38. %.xml: %.asciidoc
  39. $(AM_V_GEN)$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
  40. -aversion=$(VERSION) $(ASCIIDOC_EXTRA) -o $@ $<
  41. %.html: %.asciidoc
  42. $(AM_V_GEN)$(ASCIIDOC) -b html4 -d article -f asciidoc.conf \
  43. -aversion=$(VERSION) $(ASCIIDOC_EXTRA) -o $@ $<
  44. doc_DATA = $(MAN_HTML)
  45. CLEANFILES = $(MAN_XML) $(man_MANS) $(MAN_HTML)
  46. EXTRA_DIST = *.asciidoc asciidoc.conf *.xsl