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
|
asciidoctor = find_program('asciidoctor', required: get_option('manpage'))
custom_target('manpage.7',
# list depend_files so the output can be updated if any of them are changed
depend_files: ['smolbote.7.asciidoc', 'Usage/CommandLine.asciidoc', 'Usage/Configuration.asciidoc', 'Usage/Profile.asciidoc', 'Usage/Plugins.asciidoc', 'Usage/Filter.asciidoc'],
input: 'smolbote.7.asciidoc',
output: 'smolbote.7',
command: [asciidoctor, '--backend=manpage', '--out-file=@OUTPUT@', '@INPUT@'],
build_by_default: get_option('manpage').enabled(),
install: get_option('manpage').enabled(),
install_dir: join_paths(get_option('mandir'), 'man7')
)
custom_target('manpage.5',
# list of files this target depends on
depend_files: ['smolbote.5.asciidoc'],
input: 'smolbote.5.asciidoc',
output: 'smolbote.5',
command: [asciidoctor, '--backend=manpage', '--out-file=@OUTPUT@', '@INPUT@'],
build_by_default: get_option('manpage').enabled(),
install: get_option('manpage').enabled(),
install_dir: get_option('mandir') / 'man5'
)
custom_target('manual',
depend_files: ['smolbote.asciidoc'],
input: 'smolbote.asciidoc',
output: 'manual.html',
command: [asciidoctor, '-a', 'imagesdir=images', '--out-file=@OUTPUT@', '@INPUT@'],
build_by_default: false,
install: false
)
|