MCPcopy Create free account
hub / github.com/boostorg/build / main

Function main

v2/engine/jam.c:215–602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213char const * saved_argv0;
214
215int main( int argc, char * * argv, char * * arg_environ )
216{
217 int n;
218 char * s;
219 struct bjam_option optv[ N_OPTS ];
220 char const * all = "all";
221 int status;
222 int arg_c = argc;
223 char * * arg_v = argv;
224 char const * progname = argv[ 0 ];
225 module_t * environ_module;
226
227 saved_argv0 = argv[ 0 ];
228
229 BJAM_MEM_INIT();
230
231#ifdef OS_MAC
232 InitGraf( &qd.thePort );
233#endif
234
235 --argc;
236 ++argv;
237
238 if ( getoptions( argc, argv, "-:l:m:d:j:p:f:gs:t:ano:qv", optv ) < 0 )
239 {
240 printf( "\nusage: %s [ options ] targets...\n\n", progname );
241
242 printf( "-a Build all targets, even if they are current.\n" );
243 printf( "-dx Set the debug level to x (0-9).\n" );
244 printf( "-fx Read x instead of Jambase.\n" );
245 /* printf( "-g Build from newest sources first.\n" ); */
246 printf( "-jx Run up to x shell commands concurrently.\n" );
247 printf( "-lx Limit actions to x number of seconds after which they are stopped.\n" );
248 printf( "-mx Maximum target output saved (kb), default is to save all output.\n" );
249 printf( "-n Don't actually execute the updating actions.\n" );
250 printf( "-ox Write the updating actions to file x.\n" );
251 printf( "-px x=0, pipes action stdout and stderr merged into action output.\n" );
252 printf( "-q Quit quickly as soon as a target fails.\n" );
253 printf( "-sx=y Set variable x=y, overriding environment.\n" );
254 printf( "-tx Rebuild x, even if it is up-to-date.\n" );
255 printf( "-v Print the version of jam and exit.\n" );
256 printf( "--x Option is ignored.\n\n" );
257
258 exit( EXITBAD );
259 }
260
261 /* Version info. */
262 if ( ( s = getoptval( optv, 'v', 0 ) ) )
263 {
264 printf( "Boost.Jam Version %s. %s.\n", VERSION, OSMINOR );
265 printf( " Copyright 1993-2002 Christopher Seiwald and Perforce "
266 "Software, Inc.\n" );
267 printf( " Copyright 2001 David Turner.\n" );
268 printf( " Copyright 2001-2004 David Abrahams.\n" );
269 printf( " Copyright 2002-2008 Rene Rivera.\n" );
270 printf( " Copyright 2003-2008 Vladimir Prus.\n" );
271 return EXITOK;
272 }

Callers

nothing calls this directly

Calls 15

getoptionsFunction · 0.85
getoptvalFunction · 0.85
constants_initFunction · 0.85
cwd_initFunction · 0.85
run_unit_testsFunction · 0.85
timestamp_currentFunction · 0.85
var_setFunction · 0.85
root_moduleFunction · 0.85
list_newFunction · 0.85
outf_timeFunction · 0.85
list_push_backFunction · 0.85
object_newFunction · 0.85

Tested by

no test coverage detected