1build_man = get_option('man') 2 3manpages = [ 4 'intel_aubdump', 5 'intel_audio_dump', 6 'intel_bios_dumper', 7 'intel_error_decode', 8 'intel_gpu_frequency', 9 'intel_gpu_top', 10 'intel_gtt', 11 'intel_infoframes', 12 'intel_lid', 13 'intel_panel_fitter', 14 'intel_reg', 15 'intel_stepping', 16 'intel_upload_blit_large', 17 'intel_upload_blit_large_gtt', 18 'intel_upload_blit_large_map', 19 'intel_upload_blit_small', 20 'intel_vbt_decode', 21] 22 23defs_rst = configure_file(input : 'defs.rst.in', 24 output : 'defs.rst', 25 configuration : config) 26 27rst2man = find_program('rst2man-3', 'rst2man', required : build_man) 28rst2man_script = find_program('rst2man.sh') 29 30if rst2man.found() 31 foreach manpage : manpages 32 custom_target(manpage + '.1', 33 build_by_default : true, 34 command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ], 35 depend_files : [ defs_rst ], 36 input: manpage + '.rst', 37 output : manpage + '.1.gz', 38 install : true, 39 install_dir : join_paths(mandir, 'man1')) 40 endforeach 41endif 42 43build_info += 'Build man pages: @0@'.format(rst2man.found()) 44