meson.build 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. proto_to_docboox_xsl = files('xsl/protocol-to-docbook.xsl')
  2. proto_iface_to_docboox_xsl = files('xsl/protocol-interfaces-to-docbook.xsl')
  3. merge_mapcoords_xsl = files('xsl/merge-mapcoords.xsl')
  4. to_publican_xsl = files('xsl/doxygen-to-publican.xsl')
  5. publican_inputs = []
  6. publican_image_maps = []
  7. foreach src : files([
  8. 'Wayland.xml', # must be first in publican_inputs
  9. 'Wayland.ent',
  10. 'Book_Info.xml',
  11. 'Author_Group.xml',
  12. 'Foreword.xml',
  13. 'Client.xml',
  14. 'Server.xml',
  15. ])
  16. name = fs.name(src)
  17. publican_inputs += fs.copyfile(name)
  18. endforeach
  19. publican_inputs += custom_target(
  20. 'ProtocolSpec.xml',
  21. command: [ xsltproc, '-o', '@OUTPUT@', proto_to_docboox_xsl, '@INPUT@' ],
  22. input: wayland_protocol_xml,
  23. output: 'ProtocolSpec.xml'
  24. )
  25. publican_inputs += custom_target(
  26. 'ProtocolInterfaces.xml',
  27. command: [ xsltproc, '-o', '@OUTPUT@', proto_iface_to_docboox_xsl, '@INPUT@' ],
  28. input: wayland_protocol_xml,
  29. output: 'ProtocolInterfaces.xml'
  30. )
  31. # Doxygen generates a myriad of files, and offers an XSLT
  32. # to combine them all into one. This does the combining.
  33. # The result is still Doxygen XML.
  34. ClientAPI_combined = custom_target(
  35. 'ClientAPI-combine-doxygen-files',
  36. command: [ xsltproc, '-o', '@OUTPUT@', '@INPUT@' ],
  37. input: [ doxygen_Client_combine_xslt, doxygen_Client_index_xml ],
  38. output: 'ClientAPI-combined.xml'
  39. )
  40. # This converts Doxygen XML to DocBook XML.
  41. publican_inputs += custom_target(
  42. 'ClientAPI-doxygen-to-docbook',
  43. command: [ xsltproc, '-o', '@OUTPUT@', '--stringparam', 'which', 'Client', to_publican_xsl, '@INPUT@' ],
  44. input: ClientAPI_combined,
  45. output: 'ClientAPI.xml'
  46. )
  47. ServerAPI_combined = custom_target(
  48. 'ServerAPI-combine-doxygen-files',
  49. command: [ xsltproc, '-o', '@OUTPUT@', '@INPUT@' ],
  50. input: [ doxygen_Server_combine_xslt, doxygen_Server_index_xml ],
  51. output: 'ServerAPI-combined.xml'
  52. )
  53. publican_inputs += custom_target(
  54. 'ServerAPI-doxygen-to-docbook',
  55. command: [ xsltproc, '-o', '@OUTPUT@', '--stringparam', 'which', 'Server', to_publican_xsl, '@INPUT@' ],
  56. input: ServerAPI_combined,
  57. output: 'ServerAPI.xml'
  58. )
  59. subdir('html/css')
  60. subdir('html/images')
  61. skip_validation = '--skip-validation'
  62. if get_option('docbook_validation')
  63. skip_validation = []
  64. endif
  65. custom_target(
  66. 'Wayland-docbook-html',
  67. command: [
  68. xmlto,
  69. skip_validation,
  70. '--stringparam', 'chunker.output.encoding=UTF-8',
  71. '--stringparam', 'chunk.section.depth=0',
  72. '--stringparam', 'toc.section.depth=1',
  73. '--stringparam', 'generate.consistent.ids=1',
  74. '--stringparam', 'html.stylesheet=css/default.css',
  75. '-o', '@OUTPUT@',
  76. 'html',
  77. '@INPUT0@'
  78. ],
  79. input: publican_inputs,
  80. output: 'html',
  81. build_by_default: true,
  82. install: true,
  83. install_dir: publican_install_prefix,
  84. )