1gnome = import('gnome')
2
3ignore_headers = [
4	'gen6_render.h',
5	'gen7_media.h',
6	'gen7_render.h',
7	'gen8_media.h',
8	'gen8_render.h',
9	'gpgpu_fill.h',
10	'i830_reg.h',
11	'i915_3d.h',
12	'i915_pciids.h',
13	'i915_reg.h',
14	'igt_edid_template.h',
15	'intel_reg.h',
16	'debug.h',
17	'instdone.h',
18	'media_fill.h',
19	'rendercopy.h',
20	'media_spin.h',
21	'media_fill_gen9.h',
22	'gen9_render.h',
23	'version.h',
24]
25
26test_groups = [
27	'amdgpu',
28	'chamelium',
29	'core',
30	'debugfs',
31	'drm',
32	'gem',
33	'gen3',
34	'gen7',
35	'gvt',
36	'i915',
37	'kms',
38	'meta',
39	'perf',
40	'pm',
41	'prime',
42	'sw_sync',
43	'testdisplay',
44	'tools',
45	'vgem',
46]
47
48gen_description = find_program('generate_description_xml.py')
49gen_programs = find_program('generate_programs_xml.sh')
50
51generated_docs = []
52
53configure_file(input: 'version.xml.in',
54	       output: 'version.xml',
55	       install: false, configuration: config)
56
57foreach group : test_groups
58	programs_xml = 'igt_test_programs_' + group + '_programs.xml'
59	generated_docs += custom_target(programs_xml,
60		      output : programs_xml,
61		      command : [ gen_programs, '@OUTPUT@', group, test_list_target ])
62
63	description_xml = 'igt_test_programs_' + group + '_description.xml'
64	generated_docs += custom_target(description_xml,
65		      output : description_xml,
66		      depends : test_executables,
67		      command : [ gen_description, '@OUTPUT@', group, test_list_target ])
68endforeach
69
70gnome.gtkdoc('igt-gpu-tools',
71	     content_files : ['igt_test_programs.xml'] + generated_docs,
72	     dependencies : lib_igt,
73	     install : true,
74	     main_xml : 'igt-gpu-tools-docs.xml',
75	     scan_args : '--rebuild-sections',
76	     mkdb_args : '--output-format=xml',
77	     ignore_headers : ignore_headers,
78	     src_dir : inc_for_gtkdoc)
79