aboutsummaryrefslogtreecommitdiff
blob: a671d7114f6c207206d876f1612068c9f11c2182 (plain)
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
subdir('api')
subdir('fragment')

xmlto = find_program('xmlto', required : get_option('doc'))

if not xmlto.found()
    subdir_done()
endif

docbook_src = [
    version_doc_fragment,
    'config.docbook',
    'config/bashrc.docbook',
    'config/sets.docbook',
    'custom.xsl',
    'dependency_resolution.docbook',
    'dependency_resolution/decision_making.docbook',
    'dependency_resolution/package_modeling.docbook',
    'dependency_resolution/task_scheduling.docbook',
    'package.docbook',
    'package/ebuild.docbook',
    'package/ebuild/eapi/0.docbook',
    'package/ebuild/eapi/1.docbook',
    'package/ebuild/eapi/2.docbook',
    'package/ebuild/eapi/3.docbook',
    'package/ebuild/eapi/4.docbook',
    'package/ebuild/eapi/4-slot-abi.docbook',
    'package/ebuild/eapi/5.docbook',
    'package/ebuild/helper_functions.docbook',
    'package/ebuild/phases.docbook',
    'portage.docbook',
    'qa.docbook'
]

custom_target(
    'xhtml-nochunks',
    depend_files : docbook_src,
    output : ['portage.html'],
    command : ['xmlto', '-o', '@OUTDIR@', '--searchpath', '@OUTDIR@/fragment', '-m', '@CURRENT_SOURCE_DIR@/custom.xsl', 'xhtml-nochunks', '@CURRENT_SOURCE_DIR@/portage.docbook'],
    install : get_option('doc') and get_option('doc-formats').contains('xhtml-nochunks'),
    install_dir : docdir / 'html'
)

# xhtml generates a lot of files, and it would be awkward to keep a list
# updated. This workaround is slightly hacky as you're probably not supposed to
# set "output" to a directory. Note that it cannot include a /. Another
# alternative is to use install_subdir, but it's not much better as you still
# need to set "output" to a directory.

custom_target(
    'xhtml',
    depend_files : docbook_src,
    output : ['html'],
    command : ['xmlto', '-o', '@OUTDIR@/html', '--searchpath', '@OUTDIR@/fragment', '-m', '@CURRENT_SOURCE_DIR@/custom.xsl', 'xhtml', '@CURRENT_SOURCE_DIR@/portage.docbook'],
    install : get_option('doc') and get_option('doc-formats').contains('xhtml'),
    install_dir : docdir
)