445 |
445 |
446 bld.add_subdirs('bindings/python') |
446 bld.add_subdirs('bindings/python') |
447 |
447 |
448 if Params.g_options.run: |
448 if Params.g_options.run: |
449 # Check that the requested program name is valid |
449 # Check that the requested program name is valid |
450 try: |
450 program_name, dummy_program_argv = wutils.get_run_program(Params.g_options.run, get_command_template()) |
451 wutils.find_program(Params.g_options.run, env) |
451 |
452 except ValueError, ex: |
|
453 Params.fatal(str(ex)) |
|
454 |
|
455 # When --run'ing a program, tell WAF to only build that program, |
452 # When --run'ing a program, tell WAF to only build that program, |
456 # nothing more; this greatly speeds up compilation when all you |
453 # nothing more; this greatly speeds up compilation when all you |
457 # want to do is run a test program. |
454 # want to do is run a test program. |
458 if not Params.g_options.compile_targets: |
455 if not Params.g_options.compile_targets: |
459 Params.g_options.compile_targets = Params.g_options.run |
456 Params.g_options.compile_targets = program_name |
460 |
457 |
461 |
458 |
462 |
459 |
463 def get_command_template(*arguments): |
460 def get_command_template(*arguments): |
464 if Params.g_options.valgrind: |
461 if Params.g_options.valgrind: |