1 # Copyright © 2018 Intel Corporation
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are met:
8 # - Redistributions of source code must retain the above copyright notice, this
9 # list of conditions and the following disclaimer.
11 # - Redistributions in binary form must reproduce the above copyright notice,
12 # this list of conditions and the following disclaimer in the documentation
13 # and/or other materials provided with the distribution.
15 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 files_man_common = files(
27 'common/author-chad.versace.xml',
28 'common/author-emil.velikov.xml',
29 'common/author-jordan.l.justen.xml',
30 'common/copyright.xml',
31 'common/error-codes.xml',
33 'common/legalnotice.xml',
34 'common/return-value.xml',
37 # Each entry is a 4 part tuple consisting of
38 # <man section>, <name>, <extra pages that are <name>_<page>>, <extra_pages>
40 ['1', 'wflinfo', [], []],
41 ['3', 'waffle_attrib_list', ['get', 'get_with_default', 'length', 'update'], []],
42 ['3', 'waffle_config', ['choose', 'destroy', 'get_native'], []],
43 ['3', 'waffle_context', ['create', 'destroy', 'get_native'], []],
44 ['3', 'waffle_display', ['connect', 'disconnect', 'get_native', 'supports_context_api'], []],
45 ['3', 'waffle_dl', ['can_open', 'sym'], []],
46 ['3', 'waffle_enum', ['to_string'], []],
47 ['3', 'waffle_error', ['get_code', 'get_info', 'to_string'], []],
48 ['3', 'waffle_gbm', ['config', 'context', 'display', 'window'], []],
49 ['3', 'waffle_get_proc_address', [], []],
50 ['3', 'waffle_glx', ['config', 'context', 'display', 'window'], []],
51 ['3', 'waffle_init', [], []],
52 ['3', 'waffle_is_extension_in_string', [], []],
53 ['3', 'waffle_make_current', [], ['waffle_get_current_display', 'waffle_get_current_window', 'waffle_get_current_context']],
54 ['3', 'waffle_native', ['config', 'context', 'display', 'window'], []],
55 ['3', 'waffle_teardown', [], []],
56 ['3', 'waffle_wayland', ['config', 'context', 'display', 'window'], []],
57 ['3', 'waffle_window', ['create', 'destroy', 'get_native', 'show', 'swap_buffers'], []],
58 ['3', 'waffle_x11_egl', ['config', 'context', 'display', 'window'], []],
59 ['7', 'waffle', [], []],
60 ['7', 'waffle_feature_test_macros', [], []],
64 if get_option('build-manpages')
65 prog_xslt = find_program('xsltproc')
68 foreach s : man_targets
71 extra_out += '@0@_@1@.@2@'.format(s[1], e, s[0])
74 extra_out += '@0@.@1@'.format(e, s[0])
77 name = '@0@.@1@'.format(s[1], s[0])
79 mans += custom_target(
81 input : ['manpage.xsl', name + '.xml'],
82 output : [name, extra_out],
83 command : [prog_xslt, '-nonet', '--xinclude', '-o', '@OUTPUT0@', '@INPUT@'],
85 install_dir : join_paths(get_option('mandir'), 'man' + s[0]),
86 depend_files : files_man_common,
91 if get_option('build-htmldocs')
92 prog_xslt = find_program('xsltproc')
94 foreach s : man_targets
97 extra_out += '@0@_@1@.@2@'.format(s[1], e, s[0])
100 extra_out += '@0@.@1@'.format(e, s[0])
103 name = '@0@.@1@'.format(s[1], s[0])
107 input : ['html.xsl', name + '.xml'],
108 output : [name + '.html'],
109 command : [prog_xslt, '-nonet', '--xinclude', '-o', '@OUTPUT0@', '@INPUT@'],
111 install_dir : join_paths(docdir, 'html', 'man'),
112 depend_files : files_man_common,