-
Notifications
You must be signed in to change notification settings - Fork 609
/
meson.build
142 lines (136 loc) · 4.18 KB
/
meson.build
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
configure_file(
input: 'geany.1.in',
output: 'geany.1',
install: true,
install_dir: join_paths(join_paths(prefix, get_option('mandir'), 'man1')),
configuration: cdata
)
if rst2pdf.found()
custom_target('pdf-manual',
input: ['geany.txt'],
command: [rst2pdf, '@INPUT@', '-o', '@OUTPUT@'],
build_by_default: true
)
endif
tarball = run_command('test', '-f', 'geany.html', check: false)
if tarball.returncode() == 0 or rst2html.found()
install_data(
'images/build_menu_commands_dialog.png',
'images/edit_change_history.png',
'images/find_dialog.png',
'images/find_in_files_dialog.png',
'images/main_window.png',
'images/pref_dialog_edit_completions.png',
'images/pref_dialog_edit_display.png',
'images/pref_dialog_edit_features.png',
'images/pref_dialog_edit_indentation.png',
'images/pref_dialog_files.png',
'images/pref_dialog_gen_misc.png',
'images/pref_dialog_gen_startup.png',
'images/pref_dialog_interface_interface.png',
'images/pref_dialog_interface_notebook.png',
'images/pref_dialog_interface_toolbar.png',
'images/pref_dialog_keys.png',
'images/pref_dialog_printing.png',
'images/pref_dialog_templ.png',
'images/pref_dialog_tools.png',
'images/pref_dialog_various.png',
'images/pref_dialog_vte.png',
'images/replace_dialog.png',
'images/sidebar_documents_only.png',
'images/sidebar_show_paths.png',
'images/sidebar_show_tree.png',
install_dir: join_paths(cdata.get('GEANY_DOC_DIR'), 'html', 'images')
)
if tarball.returncode() == 0
message('Building from tarball, installing prebuild html')
geany_html = files('geany.html')
else
cmd = [rst2html, '-stg', '--stylesheet=@INPUT0@', '@INPUT1@', '@OUTPUT@']
geany_html = custom_target('geany.html',
input: ['geany.css', 'geany.txt'],
output: ['geany.html'],
build_by_default: true,
command: cmd
)
custom_target('hacking.html',
input: ['geany.css', '../HACKING'],
output: ['hacking.html'],
build_by_default: true,
command: cmd
)
endif
# geany.html is installed as index.html
custom_target('index.html',
input: [geany_html],
output: ['index.html'],
command: [ln, '-f', '@INPUT@', '@OUTPUT@'],
install: true,
install_dir: join_paths(cdata.get('GEANY_DOC_DIR'), 'html')
)
endif
install_data('geany.txt',
rename: 'manual.txt',
install_dir: cdata.get('GEANY_DOC_DIR')
)
# Normally, doxygen is required for the gtkdoc headers
# but it can be disabled if really needed (e.g. if plugins are also disabled),
# packagers must not disable this!
if doxygen.found()
doxcfg = configuration_data()
doxcfg.merge_from(cdata)
doxcfg.set('GIRONLY', '@internal')
doxcfg.set('HTML', 'YES')
doxcfg.set('XML', 'NO')
doxcfg.set('SORT', 'YES')
doxgicfg = doxcfg
doxgicfg.set('GIRONLY', '')
doxgicfg.set('HTML', 'NO')
doxgicfg.set('XML', 'YES')
doxgicfg.set('SORT', 'NO')
dep_doxygen = files([
'plugins.dox',
'pluginsignals.c',
'pluginsymbols.c',
'stash-example.c',
'stash-gui-example.c'
])
if python.found()
doxyfile_gi = configure_file(
input: 'Doxyfile.in',
output: 'Doxyfile-gi',
configuration: doxgicfg
)
doxygen_gi = custom_target('doxygen-gi',
input: doxyfile_gi,
# stamp file due https://github.com/mesonbuild/meson/issues/2320
output: 'doxygen-gi.stamp',
command: [sh, '-c', 'doxygen "$1" && touch "$2"', 'sh', '@INPUT@', '@OUTPUT@'],
depends: libgeany,
depend_files: dep_doxygen
)
gtkdoc_py = find_program('../scripts/gen-api-gtkdoc.py')
custom_target('gtkdoc-headers',
output: ['geany-gtkdoc.h', 'geany-sciwrappers-gtkdoc.h'],
command: [gtkdoc_py, join_paths(meson.current_build_dir(), 'xml'), '-d', '.', '-o', '@OUTPUT0@', '--sci-output', '@OUTPUT1@'],
depends: doxygen_gi,
install: true,
install_dir: join_paths(get_option('includedir'), 'geany', 'gtkdoc')
)
endif
doxyfile = configure_file(
input: 'Doxyfile.in',
output: 'Doxyfile',
configuration: doxcfg
)
custom_target('doxygen',
input: doxyfile,
# stamp file due https://github.com/mesonbuild/meson/issues/2320
output: 'doxygen.stamp',
command: [sh, '-c', 'doxygen "$1" && touch "$2"', 'sh', '@INPUT@', '@OUTPUT@'],
depends: libgeany,
depend_files: dep_doxygen,
build_by_default: true
)
endif