def _find_do_file(t): for dofile,basename,ext in _possible_do_files(t): debug2('%s: %s ?\n' % (t, dofile)) if os.path.exists(dofile): state.add_dep(t, 'm', dofile) return dofile,basename,ext else: state.add_dep(t, 'c', dofile) return None,None,None
def dirty_deps(t, depth, fromdir=None): if _dirty_deps(t, depth, fromdir): state.unstamp(t, fromdir) return True return False def maybe_build(t): if dirty_deps(t, depth = ''): builder.build(t) if not vars.TARGET: err('redo-ifchange: error: must be run from inside a .do\n') sys.exit(100) rv = 202 try: want_build = [] for t in sys.argv[1:]: state.add_dep(vars.TARGET, 'm', t) if dirty_deps(t, depth = ''): want_build.append(t) rv = builder.main(want_build, maybe_build) except KeyboardInterrupt: sys.exit(200) sys.exit(rv)