@@ -2,19 +2,6 @@ project('Meson documentation', version: '1.0')
22
33cur_bdir = meson .current_build_dir()
44
5- # Only the script knows which files are being generated
6- docs_gen = custom_target (
7- ' gen_docs' ,
8- input : files (' markdown/index.md' ),
9- output : ' gen_docs.stamp' ,
10- command : [
11- files (' ../tools/regenerate_docs.py' ),
12- ' --output-dir' , cur_bdir,
13- ' --dummy-output-file' , ' @OUTPUT@' ,
14- ],
15- build_by_default : true ,
16- install : false )
17-
185sitemap = files (' sitemap.txt' )
196
207yaml_loader = get_option (' unsafe_yaml' ) ? ' fastyaml' : ' yaml'
@@ -34,24 +21,6 @@ refman_binary = custom_target(
3421 ]
3522)
3623
37- refman_md = custom_target (
38- ' gen_refman_md' ,
39- input : refman_binary,
40- output : [' configured_sitemap.txt' , ' refman_links.json' ],
41- command : [
42- genrefman,
43- ' -l' , ' pickle' ,
44- ' -g' , ' md' ,
45- ' -s' , sitemap,
46- ' -i' , ' @INPUT@' ,
47- ' -o' , ' @OUTPUT0@' ,
48- ' --link-defs' , ' @OUTPUT1@' ,
49- ' --force-color' ,
50- ' --no-modules' ,
51- ],
52- )
53- sitemap = refman_md[0 ]
54-
5524refman_json = custom_target (
5625 ' gen_refman_json' ,
5726 build_by_default : true ,
@@ -66,6 +35,7 @@ refman_json = custom_target(
6635 ' --force-color' ,
6736 ],
6837)
38+ test (' validate_docs' , find_program (' ./jsonvalidator.py' ), args : [refman_json])
6939
7040refman_man = custom_target (
7141 ' gen_refman_man' ,
@@ -83,6 +53,43 @@ refman_man = custom_target(
8353 ],
8454)
8555
56+ # Everything past here is HTML resources.
57+ if not get_option (' html' )
58+ subdir_done ()
59+ endif
60+
61+ # Only the script knows which files are being generated
62+ docs_gen = custom_target (
63+ ' gen_docs' ,
64+ input : files (' markdown/index.md' ),
65+ output : ' gen_docs.stamp' ,
66+ command : [
67+ files (' ../tools/regenerate_docs.py' ),
68+ ' --output-dir' , cur_bdir,
69+ ' --dummy-output-file' , ' @OUTPUT@' ,
70+ ],
71+ build_by_default : true ,
72+ install : false ,
73+ )
74+
75+ refman_md = custom_target (
76+ ' gen_refman_md' ,
77+ input : refman_binary,
78+ output : [' configured_sitemap.txt' , ' refman_links.json' ],
79+ command : [
80+ genrefman,
81+ ' -l' , ' pickle' ,
82+ ' -g' , ' md' ,
83+ ' -s' , sitemap,
84+ ' -i' , ' @INPUT@' ,
85+ ' -o' , ' @OUTPUT0@' ,
86+ ' --link-defs' , ' @OUTPUT1@' ,
87+ ' --force-color' ,
88+ ' --no-modules' ,
89+ ],
90+ )
91+ sitemap = refman_md[0 ]
92+
8693genrelnotes = custom_target (
8794 output : [' sitemap-genrelnotes.txt' ],
8895 build_always_stale : true ,
@@ -95,8 +102,6 @@ genrelnotes = custom_target(
95102)
96103sitemap = genrelnotes[0 ]
97104
98- test (' validate_docs' , find_program (' ./jsonvalidator.py' ), args : [refman_json])
99-
100105hotdoc_prog = find_program (' hotdoc' , version : ' >=0.13.7' )
101106
102107hotdoc = import (' hotdoc' )
0 commit comments