Add a flag indicating whether to trust isFileScope from ctags
[geany-mirror.git] / doc / meson.build
bloba9a2c0257de91935f22bff53f7ce42e5bcb12416
1 configure_file(
2         input: 'geany.1.in',
3         output: 'geany.1',
4         install: true,
5         install_dir: join_paths(join_paths(prefix, get_option('mandir'), 'man1')),
6         configuration: cdata
9 if rst2pdf.found()
10         custom_target('pdf-manual',
11                 input: ['geany.txt'],
12                 output: ['geany-@0@.pdf'.format(cdata.get('VERSION'))],
13                 command: [rst2pdf, '@INPUT@', '-o', '@OUTPUT@'],
14                 build_by_default: true
15         )
16 endif
18 tarball = run_command('test', '-f', 'geany.html', check: false)
19 if tarball.returncode() == 0 or rst2html.found()
20         install_data(
21                 'images/build_menu_commands_dialog.png',
22                 'images/find_dialog.png',
23                 'images/find_in_files_dialog.png',
24                 'images/main_window.png',
25                 'images/pref_dialog_edit_completions.png',
26                 'images/pref_dialog_edit_display.png',
27                 'images/pref_dialog_edit_features.png',
28                 'images/pref_dialog_edit_indentation.png',
29                 'images/pref_dialog_files.png',
30                 'images/pref_dialog_gen_misc.png',
31                 'images/pref_dialog_gen_startup.png',
32                 'images/pref_dialog_interface_interface.png',
33                 'images/pref_dialog_interface_notebook.png',
34                 'images/pref_dialog_interface_toolbar.png',
35                 'images/pref_dialog_keys.png',
36                 'images/pref_dialog_printing.png',
37                 'images/pref_dialog_templ.png',
38                 'images/pref_dialog_tools.png',
39                 'images/pref_dialog_various.png',
40                 'images/pref_dialog_vte.png',
41                 'images/replace_dialog.png',
42                 'images/sidebar_documents_only.png',
43                 'images/sidebar_show_paths.png',
44                 'images/sidebar_show_tree.png',
45                 install_dir: join_paths(cdata.get('GEANY_DOC_DIR'), 'html', 'images')
46         )
47         if tarball.returncode() == 0
48                 message('Building from tarball, installing prebuild html')
49                 geany_html = files('geany.html')
50         else
51                 cmd = [rst2html, '-stg', '--stylesheet=@INPUT0@', '@INPUT1@', '@OUTPUT@']
52                 geany_html = custom_target('geany.html',
53                         input: ['geany.css', 'geany.txt'],
54                         output: ['geany.html'],
55                         build_by_default: true,
56                         command: cmd
57                 )
58                 custom_target('hacking.html',
59                         input: ['geany.css', '../HACKING'],
60                         output: ['hacking.html'],
61                         build_by_default: true,
62                         command: cmd
63                 )
64         endif
65         # geany.html is installed as index.html
66         custom_target('index.html',
67                 input: [geany_html],
68                 output: ['index.html'],
69                 command: [ln, '-f', '@INPUT@', '@OUTPUT@'],
70                 install: true,
71                 install_dir: join_paths(cdata.get('GEANY_DOC_DIR'), 'html')
72         )
73 endif
75 install_data('geany.txt',
76         rename: 'manual.txt',
77         install_dir: cdata.get('GEANY_DOC_DIR')
80 # Normally, doxygen is required for the gtkdoc headers
81 # but it can be disabled if really needed (e.g. if plugins are also disabled),
82 # packagers must not disable this!
83 if doxygen.found()
84         doxcfg = configuration_data()
85         doxcfg.merge_from(cdata)
86         doxcfg.set('GIRONLY', '@internal')
87         doxcfg.set('HTML', 'YES')
88         doxcfg.set('XML', 'NO')
89         doxcfg.set('SORT', 'YES')
91         doxgicfg = doxcfg
92         doxgicfg.set('GIRONLY', '')
93         doxgicfg.set('HTML', 'NO')
94         doxgicfg.set('XML', 'YES')
95         doxgicfg.set('SORT', 'NO')
97         dep_doxygen = files([
98                 'plugins.dox',
99                 'pluginsignals.c',
100                 'pluginsymbols.c',
101                 'stash-example.c',
102                 'stash-gui-example.c'
103         ])
104         if python.found()
105                 doxyfile_gi = configure_file(
106                         input: 'Doxyfile.in',
107                         output: 'Doxyfile-gi',
108                         configuration: doxgicfg
109                 )
110                 doxygen_gi = custom_target('doxygen-gi',
111                         input: doxyfile_gi,
112                         # stamp file due https://github.com/mesonbuild/meson/issues/2320
113                         output: 'doxygen-gi.stamp',
114                         command: [sh, '-c', 'doxygen "$1" && touch "$2"', 'sh', '@INPUT@', '@OUTPUT@'],
115                         depends: libgeany,
116                         depend_files: dep_doxygen
117                 )
118                 gtkdoc_py = find_program('../scripts/gen-api-gtkdoc.py')
119                 custom_target('gtkdoc-headers',
120                         output: ['geany-gtkdoc.h', 'geany-sciwrappers-gtkdoc.h'],
121                         command: [gtkdoc_py, join_paths(meson.current_build_dir(), 'xml'), '-d', '.', '-o', '@OUTPUT0@', '--sci-output', '@OUTPUT1@'],
122                         depends: doxygen_gi,
123                         install: true,
124                         install_dir: join_paths(get_option('includedir'), 'geany', 'gtkdoc')
125                 )
126         endif
127         doxyfile = configure_file(
128                 input: 'Doxyfile.in',
129                 output: 'Doxyfile',
130                 configuration: doxcfg
131         )
132         custom_target('doxygen',
133                 input: doxyfile,
134                 # stamp file due https://github.com/mesonbuild/meson/issues/2320
135                 output: 'doxygen.stamp',
136                 command: [sh, '-c', 'doxygen "$1" && touch "$2"', 'sh', '@INPUT@', '@OUTPUT@'],
137                 depends: libgeany,
138                 depend_files: dep_doxygen,
139                 build_by_default: true
140         )
141 endif