[XcodeGen] Handle 'rule' declarations and generate command line args

* Rename 'BuildRule to 'BuildEdige' because it is the official term
* NinjaParser to handle 'include' and 'rule' directives
* NinjaParser to handle parse "rule name" in 'build' correctly
* Make variable table a simple `[String: String]` and keep any bindings
  to make the substitutions possible.
* Generate command line argumets using 'command' variable in the 'rule'
  and use it as the source of truth, istead of using random known
  bindings like 'FLAGS'.
This commit is contained in:
Rintaro Ishizaki
2025-01-23 17:55:28 -08:00
parent e17df88cc1
commit 8d2ac00015
9 changed files with 405 additions and 302 deletions

View File

@@ -52,6 +52,15 @@ extension AnyPath {
a
}
}
public func absolute(in base: AbsolutePath) -> AbsolutePath {
switch self {
case .relative(let r):
r.absolute(in: base)
case .absolute(let a):
a
}
}
}
extension AnyPath: Decodable {