forked from ninja-build/ninja-build.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ninja.html
229 lines (208 loc) · 19.8 KB
/
build.ninja.html
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!-- Created by htmlize-1.36 in css mode. -->
<html>
<head>
<title>build.ninja</title>
<style type="text/css">
<!--
body {
color: #000000;
background-color: #ffffff;
}
.comment {
/* font-lock-comment-face */
color: #b22222;
}
.function-name {
/* font-lock-function-name-face */
color: #0000ff;
}
.keyword {
/* font-lock-keyword-face */
color: #a020f0;
}
.variable-name {
/* font-lock-variable-name-face */
color: #a0522d;
}
a {
color: inherit;
background-color: inherit;
font: inherit;
text-decoration: inherit;
}
a:hover {
text-decoration: underline;
}
-->
</style>
</head>
<body>
<pre>
<span class="comment"># This file is used to build ninja itself.</span>
<span class="comment"># It is generated by configure.py.</span>
<span class="variable-name">ninja_required_version</span> = 1.3
<span class="comment"># The arguments passed to configure.py, for rerunning it.</span>
<span class="variable-name">configure_args</span> =
<span class="variable-name">root</span> = .
<span class="variable-name">builddir</span> = build
<span class="variable-name">cxx</span> = g++
<span class="variable-name">ar</span> = ar
<span class="variable-name">cflags</span> = -g -Wall -Wextra -Wno-deprecated -Wno-missing-field-initializers $
-Wno-unused-parameter -fno-rtti -fno-exceptions -fvisibility=hidden $
-pipe '-DNINJA_PYTHON="python"' -O2 -DNDEBUG -DUSE_PPOLL $
-DNINJA_HAVE_BROWSE -I.
<span class="variable-name">ldflags</span> = -L<span class="variable-name">$builddir</span>
<span class="keyword">rule</span> <span class="function-name">cxx</span>
<span class="variable-name">command</span> = <span class="variable-name">$cxx</span> -MMD -MT <span class="variable-name">$out</span> -MF <span class="variable-name">$out</span>.d <span class="variable-name">$cflags</span> -c <span class="variable-name">$in</span> -o <span class="variable-name">$out</span>
<span class="variable-name">description</span> = CXX <span class="variable-name">$out</span>
<span class="variable-name">depfile</span> = <span class="variable-name">$out</span>.d
<span class="variable-name">deps</span> = gcc
<span class="keyword">rule</span> <span class="function-name">ar</span>
<span class="variable-name">command</span> = rm -f <span class="variable-name">$out</span> && <span class="variable-name">$ar</span> crs <span class="variable-name">$out</span> <span class="variable-name">$in</span>
<span class="variable-name">description</span> = AR <span class="variable-name">$out</span>
<span class="keyword">rule</span> <span class="function-name">link</span>
<span class="variable-name">command</span> = <span class="variable-name">$cxx</span> <span class="variable-name">$ldflags</span> -o <span class="variable-name">$out</span> <span class="variable-name">$in</span> <span class="variable-name">$libs</span>
<span class="variable-name">description</span> = LINK <span class="variable-name">$out</span>
<span class="comment"># browse_py.h is used to inline browse.py.</span>
<span class="keyword">rule</span> <span class="function-name">inline</span>
<span class="variable-name">command</span> = "<span class="variable-name">$root</span>/src/inline.sh" <span class="variable-name">$varname</span> < <span class="variable-name">$in</span> > <span class="variable-name">$out</span>
<span class="variable-name">description</span> = INLINE <span class="variable-name">$out</span>
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/browse_py.h: inline <span class="variable-name">$root</span>/src/browse.py | <span class="variable-name">$root</span>/src/inline.sh
<span class="variable-name">varname</span> = kBrowsePy
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/browse.o: cxx <span class="variable-name">$root</span>/src/browse.cc || <span class="variable-name">$builddir</span>/browse_py.h
<span class="comment"># the depfile parser and ninja lexers are generated using re2c.</span>
<span class="keyword">rule</span> <span class="function-name">re2c</span>
<span class="variable-name">command</span> = re2c -b -i --no-generation-date -o <span class="variable-name">$out</span> <span class="variable-name">$in</span>
<span class="variable-name">description</span> = RE2C <span class="variable-name">$out</span>
<span class="keyword">build</span> <span class="variable-name">$root</span>/src/depfile_parser.cc: re2c <span class="variable-name">$root</span>/src/depfile_parser.in.cc
<span class="keyword">build</span> <span class="variable-name">$root</span>/src/lexer.cc: re2c <span class="variable-name">$root</span>/src/lexer.in.cc
<span class="comment"># Core source files all build into ninja library.</span>
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/build.o: cxx <span class="variable-name">$root</span>/src/build.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/build_log.o: cxx <span class="variable-name">$root</span>/src/build_log.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/clean.o: cxx <span class="variable-name">$root</span>/src/clean.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/debug_flags.o: cxx <span class="variable-name">$root</span>/src/debug_flags.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/depfile_parser.o: cxx <span class="variable-name">$root</span>/src/depfile_parser.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/deps_log.o: cxx <span class="variable-name">$root</span>/src/deps_log.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/disk_interface.o: cxx <span class="variable-name">$root</span>/src/disk_interface.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/edit_distance.o: cxx <span class="variable-name">$root</span>/src/edit_distance.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/eval_env.o: cxx <span class="variable-name">$root</span>/src/eval_env.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/graph.o: cxx <span class="variable-name">$root</span>/src/graph.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/graphviz.o: cxx <span class="variable-name">$root</span>/src/graphviz.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/lexer.o: cxx <span class="variable-name">$root</span>/src/lexer.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/line_printer.o: cxx <span class="variable-name">$root</span>/src/line_printer.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/manifest_parser.o: cxx <span class="variable-name">$root</span>/src/manifest_parser.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/metrics.o: cxx <span class="variable-name">$root</span>/src/metrics.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/state.o: cxx <span class="variable-name">$root</span>/src/state.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/util.o: cxx <span class="variable-name">$root</span>/src/util.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/version.o: cxx <span class="variable-name">$root</span>/src/version.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/subprocess-posix.o: cxx <span class="variable-name">$root</span>/src/subprocess-posix.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/libninja.a: ar <span class="variable-name">$builddir</span>/browse.o <span class="variable-name">$builddir</span>/build.o $
<span class="variable-name">$builddir</span>/build_log.o <span class="variable-name">$builddir</span>/clean.o <span class="variable-name">$builddir</span>/debug_flags.o $
<span class="variable-name">$builddir</span>/depfile_parser.o <span class="variable-name">$builddir</span>/deps_log.o $
<span class="variable-name">$builddir</span>/disk_interface.o <span class="variable-name">$builddir</span>/edit_distance.o $
<span class="variable-name">$builddir</span>/eval_env.o <span class="variable-name">$builddir</span>/graph.o <span class="variable-name">$builddir</span>/graphviz.o $
<span class="variable-name">$builddir</span>/lexer.o <span class="variable-name">$builddir</span>/line_printer.o <span class="variable-name">$builddir</span>/manifest_parser.o $
<span class="variable-name">$builddir</span>/metrics.o <span class="variable-name">$builddir</span>/state.o <span class="variable-name">$builddir</span>/util.o $
<span class="variable-name">$builddir</span>/version.o <span class="variable-name">$builddir</span>/subprocess-posix.o
<span class="comment"># Main executable is library plus main() function.</span>
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/ninja.o: cxx <span class="variable-name">$root</span>/src/ninja.cc
<span class="keyword">build</span> ninja: link <span class="variable-name">$builddir</span>/ninja.o | <span class="variable-name">$builddir</span>/libninja.a
<span class="variable-name">libs</span> = -lninja
<span class="comment"># Tests all build into ninja_test executable.</span>
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/build_log_test.o: cxx <span class="variable-name">$root</span>/src/build_log_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/build_test.o: cxx <span class="variable-name">$root</span>/src/build_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/clean_test.o: cxx <span class="variable-name">$root</span>/src/clean_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/depfile_parser_test.o: cxx <span class="variable-name">$root</span>/src/depfile_parser_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/deps_log_test.o: cxx <span class="variable-name">$root</span>/src/deps_log_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/disk_interface_test.o: cxx <span class="variable-name">$root</span>/src/disk_interface_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/edit_distance_test.o: cxx <span class="variable-name">$root</span>/src/edit_distance_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/graph_test.o: cxx <span class="variable-name">$root</span>/src/graph_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/lexer_test.o: cxx <span class="variable-name">$root</span>/src/lexer_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/manifest_parser_test.o: cxx <span class="variable-name">$root</span>/src/manifest_parser_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/ninja_test.o: cxx <span class="variable-name">$root</span>/src/ninja_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/state_test.o: cxx <span class="variable-name">$root</span>/src/state_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/subprocess_test.o: cxx <span class="variable-name">$root</span>/src/subprocess_test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/test.o: cxx <span class="variable-name">$root</span>/src/test.cc
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/util_test.o: cxx <span class="variable-name">$root</span>/src/util_test.cc
<span class="keyword">build</span> ninja_test: link <span class="variable-name">$builddir</span>/build_log_test.o <span class="variable-name">$builddir</span>/build_test.o $
<span class="variable-name">$builddir</span>/clean_test.o <span class="variable-name">$builddir</span>/depfile_parser_test.o $
<span class="variable-name">$builddir</span>/deps_log_test.o <span class="variable-name">$builddir</span>/disk_interface_test.o $
<span class="variable-name">$builddir</span>/edit_distance_test.o <span class="variable-name">$builddir</span>/graph_test.o $
<span class="variable-name">$builddir</span>/lexer_test.o <span class="variable-name">$builddir</span>/manifest_parser_test.o $
<span class="variable-name">$builddir</span>/ninja_test.o <span class="variable-name">$builddir</span>/state_test.o $
<span class="variable-name">$builddir</span>/subprocess_test.o <span class="variable-name">$builddir</span>/test.o <span class="variable-name">$builddir</span>/util_test.o | $
<span class="variable-name">$builddir</span>/libninja.a
<span class="variable-name">libs</span> = -lninja
<span class="comment"># Ancillary executables.</span>
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/build_log_perftest.o: cxx <span class="variable-name">$root</span>/src/build_log_perftest.cc
<span class="keyword">build</span> build_log_perftest: link <span class="variable-name">$builddir</span>/build_log_perftest.o | $
<span class="variable-name">$builddir</span>/libninja.a
<span class="variable-name">libs</span> = -lninja
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/canon_perftest.o: cxx <span class="variable-name">$root</span>/src/canon_perftest.cc
<span class="keyword">build</span> canon_perftest: link <span class="variable-name">$builddir</span>/canon_perftest.o | <span class="variable-name">$builddir</span>/libninja.a
<span class="variable-name">libs</span> = -lninja
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/depfile_parser_perftest.o: cxx $
<span class="variable-name">$root</span>/src/depfile_parser_perftest.cc
<span class="keyword">build</span> depfile_parser_perftest: link <span class="variable-name">$builddir</span>/depfile_parser_perftest.o | $
<span class="variable-name">$builddir</span>/libninja.a
<span class="variable-name">libs</span> = -lninja
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/hash_collision_bench.o: cxx <span class="variable-name">$root</span>/src/hash_collision_bench.cc
<span class="keyword">build</span> hash_collision_bench: link <span class="variable-name">$builddir</span>/hash_collision_bench.o | $
<span class="variable-name">$builddir</span>/libninja.a
<span class="variable-name">libs</span> = -lninja
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/manifest_parser_perftest.o: cxx $
<span class="variable-name">$root</span>/src/manifest_parser_perftest.cc
<span class="keyword">build</span> manifest_parser_perftest: link <span class="variable-name">$builddir</span>/manifest_parser_perftest.o | $
<span class="variable-name">$builddir</span>/libninja.a
<span class="variable-name">libs</span> = -lninja
<span class="comment"># Generate a graph using the "graph" tool.</span>
<span class="keyword">rule</span> <span class="function-name">gendot</span>
<span class="variable-name">command</span> = ./ninja -t graph all > <span class="variable-name">$out</span>
<span class="keyword">rule</span> <span class="function-name">gengraph</span>
<span class="variable-name">command</span> = dot -Tpng <span class="variable-name">$in</span> > <span class="variable-name">$out</span>
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/graph.dot: gendot ninja build.ninja
<span class="keyword">build</span> graph.png: gengraph <span class="variable-name">$builddir</span>/graph.dot
<span class="comment"># Generate the manual using asciidoc.</span>
<span class="keyword">rule</span> <span class="function-name">asciidoc</span>
<span class="variable-name">command</span> = asciidoc -b docbook -d book -o <span class="variable-name">$out</span> <span class="variable-name">$in</span>
<span class="variable-name">description</span> = ASCIIDOC <span class="variable-name">$out</span>
<span class="keyword">rule</span> <span class="function-name">xsltproc</span>
<span class="variable-name">command</span> = xsltproc --nonet doc/docbook.xsl <span class="variable-name">$in</span> > <span class="variable-name">$out</span>
<span class="variable-name">description</span> = XSLTPROC <span class="variable-name">$out</span>
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/manual.xml: asciidoc <span class="variable-name">$root</span>/doc/manual.asciidoc
<span class="keyword">build</span> <span class="variable-name">$root</span>/doc/manual.html: xsltproc <span class="variable-name">$builddir</span>/manual.xml | $
<span class="variable-name">$root</span>/doc/style.css <span class="variable-name">$root</span>/doc/docbook.xsl
<span class="keyword">build</span> manual: phony || <span class="variable-name">$root</span>/doc/manual.html
<span class="keyword">rule</span> <span class="function-name">dblatex</span>
<span class="variable-name">command</span> = dblatex -q -o <span class="variable-name">$out</span> -p doc/dblatex.xsl <span class="variable-name">$in</span>
<span class="variable-name">description</span> = DBLATEX <span class="variable-name">$out</span>
<span class="keyword">build</span> <span class="variable-name">$root</span>/doc/manual.pdf: dblatex <span class="variable-name">$builddir</span>/manual.xml | $
<span class="variable-name">$root</span>/doc/dblatex.xsl
<span class="comment"># Generate Doxygen.</span>
<span class="keyword">rule</span> <span class="function-name">doxygen</span>
<span class="variable-name">command</span> = doxygen <span class="variable-name">$in</span>
<span class="variable-name">description</span> = DOXYGEN <span class="variable-name">$in</span>
<span class="variable-name">doxygen_mainpage_generator</span> = <span class="variable-name">$root</span>/src/gen_doxygen_mainpage.sh
<span class="keyword">rule</span> <span class="function-name">doxygen_mainpage</span>
<span class="variable-name">command</span> = <span class="variable-name">$doxygen_mainpage_generator</span> <span class="variable-name">$in</span> > <span class="variable-name">$out</span>
<span class="variable-name">description</span> = DOXYGEN_MAINPAGE <span class="variable-name">$out</span>
<span class="keyword">build</span> <span class="variable-name">$builddir</span>/doxygen_mainpage: doxygen_mainpage README COPYING | $
<span class="variable-name">$doxygen_mainpage_generator</span>
<span class="keyword">build</span> doxygen: doxygen <span class="variable-name">$root</span>/doc/doxygen.config | <span class="variable-name">$builddir</span>/doxygen_mainpage
<span class="comment"># Regenerate build files if build script changes.</span>
<span class="keyword">rule</span> <span class="function-name">configure</span>
<span class="variable-name">command</span> = ${configure_env}python <span class="variable-name">$root</span>/configure.py <span class="variable-name">$configure_args</span>
<span class="variable-name">generator</span> = 1
<span class="keyword">build</span> build.ninja: configure | <span class="variable-name">$root</span>/configure.py <span class="variable-name">$root</span>/misc/ninja_syntax.py
default ninja
<span class="comment"># Packaging</span>
<span class="keyword">rule</span> <span class="function-name">rpmbuild</span>
<span class="variable-name">command</span> = misc/packaging/rpmbuild.sh
<span class="variable-name">description</span> = Building rpms..
<span class="keyword">build</span> rpm: rpmbuild
<span class="keyword">build</span> all: phony ninja ninja_test build_log_perftest canon_perftest $
depfile_parser_perftest hash_collision_bench manifest_parser_perftest
</pre>
</body>
</html>