Commit 42e72cde authored by Drew's avatar Drew

Support incremental compiles

parent 542d6286
Pipeline #1126 passed with stage
......@@ -21,6 +21,8 @@ import attools
enum Options: String {
case Overlay = "--use-overlay"
case CustomFile = "-f"
case Help = "--help"
case Clean = "--clean"
static var allOptions : [Options] { return [Overlay, CustomFile] }
}
......@@ -55,7 +57,7 @@ if Process.arguments.contains("--help") {
print("© 2016 Anarchy Tools Contributors.")
print("")
print("Usage:")
print("atbuild [-f packagefile] [task]")
print("atbuild [-f packagefile] [task] [--clean]")
let package = loadPackageFile()
print("tasks:")
......
......@@ -265,10 +265,14 @@ final class ATllbuild : Tool {
//We just want to create a state where .atllbuild/objects and .atllbuild/llbuildtmp and .atllbuild/products exists.
//and in particular, without erasing the product directory, since that accumulates build products across
//multiple invocations of atllbuild.
let _ = try? manager.removeItemAtPath(workDirectory + "/objects")
let _ = try? manager.removeItemAtPath(workDirectory + "/llbuildtmp")
if Process.arguments.contains("--clean") {
let _ = try? manager.removeItemAtPath(workDirectory + "/objects")
let _ = try? manager.removeItemAtPath(workDirectory + "/llbuildtmp")
}
let _ = try? manager.removeItemAtPath(workDirectory + "/include")
let _ = try? manager.createDirectoryAtPath(workDirectory, withIntermediateDirectories: false, attributes: nil)
let _ = try? manager.createDirectoryAtPath(workDirectory + "/products", withIntermediateDirectories: false, attributes: nil)
let _ = try? manager.createDirectoryAtPath(workDirectory + "/objects", withIntermediateDirectories: false, attributes: nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment