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/copyright.xml',
30 'common/error-codes.xml',
31 'common/legalnotice.xml',
32 'common/return-value.xml',
35 # Each entry is a 4 part tuple consisting of
36 # <man section>, <name>, <extra pages that are <name>_<page>>, <extra_pages>
38 ['1', 'wflinfo', [], []],
39 ['3', 'waffle_attrib_list', ['get', 'get_with_default', 'length', 'update'], []],
40 ['3', 'waffle_config', ['choose', 'destroy', 'get_native'], []],
41 ['3', 'waffle_context', ['create', 'destroy', 'get_native'], []],
42 ['3', 'waffle_display', ['connect', 'disconnect', 'get_native', 'supports_context_api'], []],
43 ['3', 'waffle_dl', ['can_open', 'sym'], []],
44 ['3', 'waffle_enum', ['to_string'], []],
45 ['3', 'waffle_error', ['get_code', 'get_info', 'to_string'], []],
46 ['3', 'waffle_gbm', ['config', 'context', 'display', 'window'], []],
47 ['3', 'waffle_get_proc_address', [], []],
48 ['3', 'waffle_glx', ['config', 'context', 'display', 'window'], []],
49 ['3', 'waffle_init', [], []],
50 ['3', 'waffle_is_extension_in_string', [], []],
51 ['3', 'waffle_make_current', [], ['waffle_get_current_display', 'waffle_get_current_window', 'waffle_get_current_context']],
52 ['3', 'waffle_native', ['config', 'context', 'display', 'window'], []],
53 ['3', 'waffle_teardown', [], []],
54 ['3', 'waffle_wayland', ['config', 'context', 'display', 'window'], []],
55 ['3', 'waffle_window', ['create', 'destroy', 'get_native', 'show', 'swap_buffers'], []],
56 ['3', 'waffle_x11_egl', ['config', 'context', 'display', 'window'], []],
57 ['7', 'waffle', [], []],
58 ['7', 'waffle_feature_test_macros', [], []],
62 if get_option('build-manpages')
63 prog_xslt = find_program('xsltproc')
66 foreach s : man_targets
69 extra_out += '@0@_@1@.@2@'.format(s[1], e, s[0])
72 extra_out += '@0@.@1@'.format(e, s[0])
75 name = '@0@.@1@'.format(s[1], s[0])
77 mans += custom_target(
79 input : ['manpage.xsl', name + '.xml'],
80 output : [name, extra_out],
81 command : [prog_xslt, '-nonet', '--xinclude', '-o', '@OUTPUT0@', '@INPUT@'],
83 install_dir : join_paths(get_option('mandir'), 'man' + s[0]),
84 depend_files : files_man_common,
89 if get_option('build-htmldocs')
90 prog_xslt = find_program('xsltproc')
92 foreach s : man_targets
95 extra_out += '@0@_@1@.@2@'.format(s[1], e, s[0])
98 extra_out += '@0@.@1@'.format(e, s[0])
101 name = '@0@.@1@'.format(s[1], s[0])
105 input : ['html.xsl', name + '.xml'],
106 output : [name + '.html'],
107 command : [prog_xslt, '-nonet', '--xinclude', '-o', '@OUTPUT0@', '@INPUT@'],
109 install_dir : join_paths(docdir, 'html', 'man'),
110 depend_files : files_man_common,