File: meson.build

package info (click to toggle)
libxml2 2.15.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,964 kB
  • sloc: ansic: 138,103; python: 6,692; sh: 4,736; xml: 1,476; makefile: 715
file content (67 lines) | stat: -rw-r--r-- 1,849 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Doxygen

doxygen = find_program('doxygen')

# TODO: To make the xml directory work as dependency of the
# Python target, we must make sure that its timestamp changes
# whenever the docs are rebuilt. Either delete the directory
# before generating, or touch it afterward?
doxygen_docs = custom_target(
    'Doxygen documentation',
    input: [
        xml_src_files, libxml_headers,
        files('libxml2.css', 'mainpage.md'),
    ],
    output: [ 'html', 'xml' ],
    command: [ doxygen, '-q', files('Doxyfile') ],
    env: {
        'SOURCE_ROOT': meson.project_source_root() + '/',
        'BUILD_ROOT':  meson.project_build_root()  + '/',
    },
    install: true,
    install_dir: [ want_docs ? dir_doc : false, false ],
)

if want_docs
    # xml2-config

    install_man('xml2-config.1')

    # Docbook

    xsltproc = find_program('xsltproc')
    types = [
        [ 'manpages', '.1',    dir_man / 'man1' ],
        [ 'html',     '.html', dir_doc ],
    ]
    programs = [ 'xmllint' ]
    if want_catalog and want_output
        programs += 'xmlcatalog'
    endif

    foreach prog : programs
        foreach type : types
            format = type[0]
            ext = type[1]
            install_dir = type[2]

            xsl = 'http://docbook.sourceforge.net' + \
                  f'/release/xsl/current/@format@/docbook.xsl'
            output = prog + ext

            custom_target(
                output,
                input: prog + '.xml',
                output: output,
                command: [xsltproc,
                    '--nonet', '--novalid',
                    '--param', 'man.output.quietly', '1',
                    '-o', '@OUTPUT@',
                    xsl, '@INPUT@'
                ],
                install: true,
                install_dir: install_dir
            )
        endforeach
    endforeach
endif