Debian Codegraph @

data/meson.build

raw
1 schema_generator = files('../tools/generate_gsettings_schemas.py')
2
3 # Source files with @gsettings_schema decorators. For meson dependency tracking only;
4 # the Python script discovers schemas by scanning src/orca/*.py at build time.
5 schema_sources = files(
6 '../src/orca/speechserver.py',
7 '../src/orca/speech_manager.py',
8 '../src/orca/speech_presenter.py',
9 '../src/orca/braille_presenter.py',
10 '../src/orca/typing_echo_presenter.py',
11 '../src/orca/caret_navigator.py',
12 '../src/orca/structural_navigator.py',
13 '../src/orca/table_navigator.py',
14 '../src/orca/document_presenter.py',
15 '../src/orca/say_all_presenter.py',
16 '../src/orca/flat_review_presenter.py',
17 '../src/orca/sound_presenter.py',
18 '../src/orca/chat_presenter.py',
19 '../src/orca/spellcheck_presenter.py',
20 '../src/orca/mouse_review.py',
21 '../src/orca/live_region_presenter.py',
22 '../src/orca/system_information_presenter.py',
23 '../src/orca/pronunciation_dictionary_manager.py',
24 '../src/orca/command_manager.py',
25 '../src/orca/text_attribute_manager.py',
26 '../src/orca/profile_manager.py',
27 '../src/orca/orca_modifier_manager.py',
28 )
29
30 generated_schema = custom_target(
31 'org.gnome.Orca.gschema.xml',
32 output: 'org.gnome.Orca.gschema.xml',
33 command: [python3, schema_generator, meson.project_source_root() / 'src', '@OUTPUT@'],
34 depend_files: [schema_generator, schema_sources],
35 install: true,
36 install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
37 )
38
39 glib_compile_schemas = find_program('glib-compile-schemas', required: false)
40 if glib_compile_schemas.found()
41 validate_schemas_cmd = '; '.join([
42 'import pathlib, subprocess, sys',
43 'subprocess.check_call([sys.argv[1], "--strict", "--dry-run", sys.argv[2]])',
44 'pathlib.Path(sys.argv[3]).write_text("ok")',
45 ])
46 test(
47 'validate-schemas',
48 glib_compile_schemas,
49 args: ['--strict', '--dry-run', meson.current_build_dir()],
50 depends: generated_schema,
51 )
52 custom_target(
53 'validate-schemas-build',
54 output: 'schemas.validated',
55 command: [
56 python3,
57 '-c',
58 validate_schemas_cmd,
59 glib_compile_schemas,
60 meson.current_build_dir(),
61 '@OUTPUT@',
62 ],
63 depends: generated_schema,
64 build_by_default: true,
65 )
66 endif