File: meson.build

package info (click to toggle)
orca 50.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 54,168 kB
  • sloc: python: 120,002; sh: 64; makefile: 5
file content (66 lines) | stat: -rw-r--r-- 2,236 bytes parent folder | download | duplicates (2)
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
schema_generator = files('../tools/generate_gsettings_schemas.py')

# Source files with @gsettings_schema decorators. For meson dependency tracking only;
# the Python script discovers schemas by scanning src/orca/*.py at build time.
schema_sources = files(
  '../src/orca/speechserver.py',
  '../src/orca/speech_manager.py',
  '../src/orca/speech_presenter.py',
  '../src/orca/braille_presenter.py',
  '../src/orca/typing_echo_presenter.py',
  '../src/orca/caret_navigator.py',
  '../src/orca/structural_navigator.py',
  '../src/orca/table_navigator.py',
  '../src/orca/document_presenter.py',
  '../src/orca/say_all_presenter.py',
  '../src/orca/flat_review_presenter.py',
  '../src/orca/sound_presenter.py',
  '../src/orca/chat_presenter.py',
  '../src/orca/spellcheck_presenter.py',
  '../src/orca/mouse_review.py',
  '../src/orca/live_region_presenter.py',
  '../src/orca/system_information_presenter.py',
  '../src/orca/pronunciation_dictionary_manager.py',
  '../src/orca/command_manager.py',
  '../src/orca/text_attribute_manager.py',
  '../src/orca/profile_manager.py',
  '../src/orca/orca_modifier_manager.py',
)

generated_schema = custom_target(
  'org.gnome.Orca.gschema.xml',
  output: 'org.gnome.Orca.gschema.xml',
  command: [python3, schema_generator, meson.project_source_root() / 'src', '@OUTPUT@'],
  depend_files: [schema_generator, schema_sources],
  install: true,
  install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
)

glib_compile_schemas = find_program('glib-compile-schemas', required: false)
if glib_compile_schemas.found()
  validate_schemas_cmd = '; '.join([
    'import pathlib, subprocess, sys',
    'subprocess.check_call([sys.argv[1], "--strict", "--dry-run", sys.argv[2]])',
    'pathlib.Path(sys.argv[3]).write_text("ok")',
  ])
  test(
    'validate-schemas',
    glib_compile_schemas,
    args: ['--strict', '--dry-run', meson.current_build_dir()],
    depends: generated_schema,
  )
  custom_target(
    'validate-schemas-build',
    output: 'schemas.validated',
    command: [
      python3,
      '-c',
      validate_schemas_cmd,
      glib_compile_schemas,
      meson.current_build_dir(),
      '@OUTPUT@',
    ],
    depends: generated_schema,
    build_by_default: true,
  )
endif