summaryrefslogtreecommitdiff
path: root/docs/reference/libtracker-sparql/meson.build
blob: 44c1ccdcc51d839b390372955b49b3249f0d8508 (plain)
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
documents_with_examples = [
  [ 'examples.md.in', 'examples.md' ],
]
examples = []

foreach doc : documents_with_examples
  examples += custom_target(
    'examples-generate',
    input: doc[0],
    output: doc[1],
    command: [
      'embed-files.py',
      '@INPUT@',
      '@OUTPUT@',
    ],
    depend_files: [ doc[0] ],
    build_by_default: true)
endforeach

base_ontology_docs = custom_target('ontology-docgen',
    output: ['dc-ontology.md'],
    command: [tracker_docgen,
              '--md',
              '-d', join_paths(source_root, 'src/ontologies/'),
              '-o', join_paths(meson.current_build_dir())],
    depends: tracker_docgen,
    depend_files: [base_ontology],
    build_by_default: true,
)

nepomuk_ontology_docs = custom_target('nepomuk-docgen',
    output: ['nie-ontology.md'],
    command: [tracker_docgen,
              '--md',
              '-d', join_paths(source_root, 'src/ontologies/nepomuk'),
              '-o', join_paths(meson.current_build_dir()),
              '-e', meson.current_source_dir()],
    depends: tracker_docgen,
    depend_files: [base_ontology],
    build_by_default: true,
)

content = [
  'overview.md',
  'ontologies.md',
  'limits.md',
  'performance.md',
  'sparql-and-tracker.md',
  'sparql-functions.md',
  'migrating-2to3.md',
  'tutorial.md',
]

required_hotdoc_extensions = [
  'gi-extension',
  'devhelp-extension',
  'syntax-highlighting-extension',
]

foreach ext: required_hotdoc_extensions
  if not hotdoc.has_extensions(ext)
    error('Documentation enabled but HotDoc extension "@0@" is missing'.format(ext))
  endif
endforeach

hotdoc.generate_doc('tracker',
  project_version: tracker_version,
  languages: [ 'c', 'python', 'javascript' ],
  gi_c_sources: [libtracker_sparql_c_sources, libtracker_sparql_c_public_headers, libtracker_sparql_remote_c_sources],
  gi_sources: [tracker_sparql_gir[0].full_path()],
  sitemap: 'sitemap.txt',
  index: 'index.md',
  gi_index: 'gi-index.md',
  gi_smart_index: true,
  gi_c_source_roots: [sparqlinc],
  dependencies: [tracker_sparql_dep, glib, gobject],
  extra_assets: [join_paths(meson.current_source_dir(), 'images')],
  html_extra_theme: join_paths(meson.current_source_dir(), 'theme-extra'),
  syntax_highlighting_activate: true,
  devhelp_activate: true,
  install: true,
)