Makefile.am 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #
  2. # Copyright (c) 2006 Thorsten Kukuk <kukuk@thkukuk.de>
  3. #
  4. CLEANFILES = Linux-PAM_MWG.fo *~
  5. EXTRA_DIST = $(XMLS)
  6. XMLS = Linux-PAM_MWG.xml $(shell ls $(srcdir)/pam_*.xml)
  7. DEP_XMLS = $(shell ls $(top_srcdir)/doc/man/pam_*.xml)
  8. if ENABLE_REGENERATE_MAN
  9. MAINTAINERCLEANFILES = Linux-PAM_MWG.txt Linux-PAM_MWG.pdf html/*.html
  10. all: Linux-PAM_MWG.txt html/Linux-PAM_MWG.html Linux-PAM_MWG.pdf
  11. Linux-PAM_MWG.pdf: $(XMLS) $(DEP_XMLS)
  12. if ENABLE_GENERATE_PDF
  13. $(XMLLINT) --nonet --xinclude --postvalid --noent --noout $<
  14. $(XSLTPROC) --stringparam generate.toc "book toc" \
  15. --stringparam section.autolabel 1 \
  16. --stringparam section.label.includes.component.label 1 \
  17. --stringparam toc.max.depth 3 --xinclude --nonet \
  18. http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl $< > Linux-PAM_MWG.fo
  19. $(FO2PDF) Linux-PAM_MWG.fo $@
  20. else
  21. echo "No fo2pdf processor installed, skip PDF generation"
  22. endif
  23. Linux-PAM_MWG.txt: $(XMLS) $(DEP_XMLS)
  24. $(XMLLINT) --nonet --xinclude --postvalid --noent --noout $<
  25. $(XSLTPROC) --stringparam generate.toc "book toc" \
  26. --stringparam section.autolabel 1 \
  27. --stringparam section.label.includes.component.label 1 \
  28. --stringparam toc.max.depth 3 --xinclude --nonet \
  29. http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< | $(BROWSER) > $@
  30. html/Linux-PAM_MWG.html: $(XMLS) $(DEP_XMLS)
  31. @test -d html || mkdir -p html
  32. $(XMLLINT) --nonet --xinclude --postvalid --noent --noout $<
  33. $(XSLTPROC) --stringparam base.dir html/ \
  34. --stringparam root.filename Linux-PAM_MWG \
  35. --stringparam use.id.as.filename 1 \
  36. --stringparam chunk.first.sections 1 \
  37. --stringparam section.autolabel 1 \
  38. --stringparam section.label.includes.component.label 1 \
  39. --stringparam toc.max.depth 3 --xinclude --nonet \
  40. --stringparam chunker.output.encoding UTF-8 \
  41. http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
  42. distclean-local:
  43. -rm -rf html Linux-PAM_MWG.txt Linux-PAM_MWG.pdf
  44. endif
  45. install-data-local:
  46. $(mkinstalldirs) $(DESTDIR)$(docdir)
  47. $(mkinstalldirs) $(DESTDIR)$(pdfdir)
  48. $(mkinstalldirs) $(DESTDIR)$(htmldir)
  49. if test -f html/Linux-PAM_MWG.html; then \
  50. $(install_sh_DATA) html/Linux-PAM_MWG.html html/mwg-*.html \
  51. $(DESTDIR)$(htmldir)/; \
  52. elif test -f $(srcdir)/html/Linux-PAM_MWG.html; then \
  53. $(install_sh_DATA) $(srcdir)/html/Linux-PAM_MWG.html \
  54. $(srcdir)/html/mwg-*.html \
  55. $(DESTDIR)$(htmldir)/; \
  56. fi
  57. if test -f Linux-PAM_MWG.txt; then \
  58. $(install_sh_DATA) Linux-PAM_MWG.txt $(DESTDIR)$(docdir)/; \
  59. elif test -f $(srcdir)/Linux-PAM_MWG.txt; then \
  60. $(install_sh_DATA) $(srcdir)/Linux-PAM_MWG.txt \
  61. $(DESTDIR)$(docdir)/; \
  62. fi
  63. if test -f Linux-PAM_MWG.pdf; then \
  64. $(install_sh_DATA) Linux-PAM_MWG.pdf $(DESTDIR)$(pdfdir)/; \
  65. elif test -f $(srcdir)/Linux-PAM_MWG.pdf; then \
  66. $(install_sh_DATA) $(srcdir)/Linux-PAM_MWG.pdf \
  67. $(DESTDIR)$(pdfdir)/; \
  68. fi
  69. uninstall-local:
  70. -rm $(DESTDIR)$(htmldir)/Linux-PAM_MWG.html
  71. -rm $(DESTDIR)$(htmldir)/mwg-*.html
  72. -rm $(DESTDIR)$(docdir)/Linux-PAM_MWG.txt
  73. -rm $(DESTDIR)$(pdfdir)/Linux-PAM_MWG.pdf
  74. releasedocs: all
  75. $(mkinstalldirs) $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html
  76. if test -f html/Linux-PAM_MWG.html; then \
  77. cp -ap html/Linux-PAM_MWG.html html/mwg-*.html \
  78. $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html/; \
  79. elif test -f $(srcdir)/html/Linux-PAM_MWG.html; then \
  80. cp -ap $(srcdir)/html/Linux-PAM_MWG.html \
  81. $(srcdir)/html/mwg-*.html \
  82. $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html/; \
  83. else exit 1; \
  84. fi
  85. if test -f Linux-PAM_MWG.txt; then \
  86. cp -p Linux-PAM_MWG.txt \
  87. $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/; \
  88. elif test -f $(srcdir)/Linux-PAM_MWG.txt; then \
  89. cp -p $(srcdir)/Linux-PAM_MWG.txt \
  90. $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/; \
  91. else exit 1; \
  92. fi
  93. if test -f Linux-PAM_MWG.pdf; then \
  94. cp -p Linux-PAM_MWG.pdf \
  95. $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/; \
  96. elif test -f $(srcdir)/Linux-PAM_MWG.pdf; then \
  97. cp -p $(srcdir)/Linux-PAM_MWG.pdf \
  98. $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/; \
  99. else exit 1; \
  100. fi