def CleanOne(name): if not GetOption("clean"): return # Remove output files for path in Outputs(name): path = excons.out_dir + "/" + path if os.path.isfile(path): os.remove(path) excons.Print("Removed: '%s'" % excons.NormalizedRelativePath(path, excons.out_dir), tool="cmake") # Remove build temporary files buildDir = BuildDir(name) if os.path.isdir(buildDir): shutil.rmtree(buildDir) excons.Print("Removed: '%s'" % excons.NormalizedRelativePath(buildDir, excons.out_dir), tool="cmake") path = ConfigCachePath(name) if os.path.isfile(path): os.remove(path) excons.Print("Removed: '%s'" % excons.NormalizedRelativePath(path, excons.out_dir), tool="cmake") path = OutputsCachePath(name) if os.path.isfile(path): os.remove(path) excons.Print("Removed: '%s'" % excons.NormalizedRelativePath(path, excons.out_dir), tool="cmake")
def CleanOne(name): if not SCons.Script.GetOption("clean"): return # Remove output files for path in Outputs(name): path = excons.out_dir + "/" + path if os.path.isfile(path): os.remove(path) excons.Print("Removed: '%s'" % excons.NormalizedRelativePath(path, excons.out_dir), tool="automake") # Remove build temporary files buildDir = BuildDir(name) if os.path.isdir(buildDir): subprocess.Popen("cd \"%s\"; make distclean" % buildDir, shell=True).communicate() shutil.rmtree(buildDir) excons.Print("Removed: '%s'" % excons.NormalizedRelativePath(buildDir, excons.out_dir), tool="automake") path = ConfigCachePath(name) if os.path.isfile(path): os.remove(path) excons.Print("Removed: '%s'" % excons.NormalizedRelativePath(path, excons.out_dir), tool="automake") path = OutputsCachePath(name) if os.path.isfile(path): os.remove(path) excons.Print("Removed: '%s'" % excons.NormalizedRelativePath(path, excons.out_dir), tool="automake")
def CleanOne(name): if not SCons.Script.GetOption("clean"): return # Remove output files for path in Outputs(name): path = excons.out_dir + "/" + path if os.path.isfile(path): os.remove(path) excons.Print("Removed: '%s'" % excons.NormalizedRelativePath(path, excons.out_dir), tool="automake") # Remove build temporary files buildDir = BuildDir(name) if os.path.isdir(buildDir): env = None if sys.platform != "win32": _env = excons.devtoolset.GetDevtoolsetEnv(excons.GetArgument( "devtoolset", ""), merge=True) if _env: env = os.environ.copy() env.update(_env) subprocess.Popen("cd \"%s\"; make distclean" % buildDir, shell=True, env=env).communicate() shutil.rmtree(buildDir) excons.Print("Removed: '%s'" % excons.NormalizedRelativePath(buildDir, excons.out_dir), tool="automake") path = ConfigCachePath(name) if os.path.isfile(path): os.remove(path) excons.Print("Removed: '%s'" % excons.NormalizedRelativePath(path, excons.out_dir), tool="automake") path = OutputsCachePath(name) if os.path.isfile(path): os.remove(path) excons.Print("Removed: '%s'" % excons.NormalizedRelativePath(path, excons.out_dir), tool="automake")