Correctly remove obj/latest when it is a directory.

Change-Id: I435bf61633433a80647b58eeeb22d7de6de44227
This commit is contained in:
Alexandre Rames 2016-06-08 21:32:03 +01:00
parent dd47fed5e4
commit 4e2419325b

View File

@ -272,7 +272,8 @@ def PrepareVariantDir(location, build_dir):
def VIXLLibraryTarget(env):
build_dir = TargetBuildDir(env)
# Create a link to the latest build directory.
subprocess.check_call(["rm", "-f", config.dir_build_latest])
# Use `-r` to avoid failure when `latest` exists and is a directory.
subprocess.check_call(["rm", "-rf", config.dir_build_latest])
util.ensure_dir(build_dir)
subprocess.check_call(["ln", "-s", build_dir, config.dir_build_latest])
# Source files are in `src` and in `src/a64/`.