(env, root_directory, bsp_directory)
| 346 | return objs |
| 347 | |
| 348 | def PrepareModuleBuilding(env, root_directory, bsp_directory): |
| 349 | |
| 350 | global BuildOptions |
| 351 | global Env |
| 352 | global Rtt_Root |
| 353 | |
| 354 | # patch for win32 spawn |
| 355 | if env['PLATFORM'] == 'win32': |
| 356 | win32_spawn = Win32Spawn() |
| 357 | win32_spawn.env = env |
| 358 | env['SPAWN'] = win32_spawn.spawn |
| 359 | |
| 360 | Env = env |
| 361 | Rtt_Root = root_directory |
| 362 | |
| 363 | # parse bsp rtconfig.h to get used component |
| 364 | PreProcessor = create_preprocessor_instance() |
| 365 | f = open(bsp_directory + '/rtconfig.h', 'r') |
| 366 | contents = f.read() |
| 367 | f.close() |
| 368 | PreProcessor.process_contents(contents) |
| 369 | BuildOptions = PreProcessor.cpp_namespace |
| 370 | |
| 371 | AddOption('--buildlib', |
| 372 | dest = 'buildlib', |
| 373 | type = 'string', |
| 374 | help = 'building library of a component') |
| 375 | AddOption('--cleanlib', |
| 376 | dest = 'cleanlib', |
| 377 | action = 'store_true', |
| 378 | default = False, |
| 379 | help = 'clean up the library by --buildlib') |
| 380 | |
| 381 | # add program path |
| 382 | env.PrependENVPath('PATH', rtconfig.EXEC_PATH) |
| 383 | |
| 384 | def GetConfigValue(name): |
| 385 | assert type(name) == str, 'GetConfigValue: only string parameter is valid' |
nothing calls this directly
no test coverage detected