Makefile.am 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright 1999-2021 the Claws Mail team.
  2. # This file is part of Claws Mail package, and distributed under the
  3. # terms of the General Public License version 3 (or later).
  4. # See COPYING file for license details.
  5. LANGS=en es fr
  6. EXTRA_DIST=dtd $(LANGS)
  7. if BUILD_MANUAL
  8. HTML_MANUALS=$(foreach lang,$(LANGS),$(lang)/claws-mail-manual.html)
  9. PDF_MANUALS=$(foreach lang,$(LANGS),$(lang)/claws-mail-manual.pdf)
  10. PS_MANUALS=$(foreach lang,$(LANGS),$(lang)/claws-mail-manual.ps)
  11. TXT_MANUALS=$(foreach lang,$(LANGS),$(lang)/claws-mail-manual.txt)
  12. manual_deps = \
  13. $(1)/claws-mail-manual.xml \
  14. $(1)/account.xml \
  15. $(1)/ack.xml \
  16. $(1)/addrbook.xml \
  17. $(1)/advanced.xml \
  18. $(1)/faq.xml \
  19. $(1)/glossary.xml \
  20. $(1)/gpl.xml \
  21. $(1)/handling.xml \
  22. $(1)/intro.xml \
  23. $(1)/keyboard.xml \
  24. $(1)/plugins.xml \
  25. $(1)/starting.xml
  26. define HTML_template =
  27. $(1)/claws-mail-manual.$(2): $(manual_deps)
  28. @$(MKDIR_P) $(1)/$(2)
  29. SP_ENCODING=xml $(DOCBOOK2HTML) -u -o $(1)/$(2) $$<
  30. $(SED) 's,^><META,><META http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><META,' $(1)/$(2)/claws-mail-manual.$(2) > $$@
  31. rm -rf $(1)/$(2)
  32. endef
  33. define BASE_template =
  34. $(1)/claws-mail-manual.$(2): $(manual_deps)
  35. @$(MKDIR_P) $(1)/$(2)
  36. $(3) -o $(1)/$(2) $$<
  37. mv -f $(1)/$(2)/claws-mail-manual.$(2) $$@
  38. rm -rf $(1)/$(2)
  39. endef
  40. if MANUAL_HTML
  41. nobase_dist_manualhtml_DATA=$(HTML_MANUALS)
  42. manualhtmldir=$(manualdir)
  43. $(foreach lang,$(LANGS),$(eval $(call HTML_template,$(lang),html)))
  44. endif
  45. if MANUAL_PDF
  46. nobase_dist_manualpdf_DATA=$(PDF_MANUALS)
  47. manualpdfdir=$(manualdir)
  48. $(foreach lang,$(LANGS),$(eval $(call BASE_template,$(lang),pdf,$(DOCBOOK2PDF))))
  49. endif
  50. if MANUAL_PS
  51. nobase_dist_manualps_DATA=$(PS_MANUALS)
  52. manualpsdir=$(manualdir)
  53. $(foreach lang,$(LANGS),$(eval $(call BASE_template,$(lang),ps,$(DOCBOOK2PS))))
  54. endif
  55. if MANUAL_TXT
  56. nobase_dist_manualtxt_DATA=$(TXT_MANUALS)
  57. manualtxtdir=$(manualdir)
  58. $(foreach lang,$(LANGS),$(eval $(call BASE_template,$(lang),txt,$(DOCBOOK2TXT))))
  59. endif
  60. maintainer-clean:
  61. -rm -f $(HTML_MANUALS) $(PDF_MANUALS) $(PS_MANUALS) $(TXT_MANUALS)
  62. endif
  63. .PHONY: test