Commit 90693a34 authored by Drew's avatar Drew

Documentation

parent 7634738a
......@@ -2,6 +2,25 @@
The Anarchy Tools Build Tool.
# Building
To build atbuild "from scratch", simply `./bootstrap.sh`.
Then you can check the program was built successfully:
```bash
$ ./atbuild --help
atbuild - Anarchy Tools Build Tool 0.1.0-dev
https://github.com/AnarchyTools
© 2016 Anarchy Tools Contributors.
Usage:
atbuild [task]
task: ["default", "helloworld", "bootstrap"]
```
# Configuration
```bash
$ atbuild build
$ atbuild build-tests
......
# atllbuild
The `atllbuild` tool uses the `swift-llbuild` project to compile a swift module.
## API
``yaml
tasks:
build:
tool: atllbuild
name: json-swift #name of the thing being built
output-type: library
#walk the src directory and recursively find all swift files
source: ["src/**.swift"]
#If true, we don't build, we only emit llbuild.yaml to the working directory. False is the default value.
bootstrapOnly: false
```
## Implementation
The `atllbuild` tool emits an `llbuild.yaml` file. This is undocumented, but we [reverse-engineered the format from SwiftPM](https://github.com/apple/swift-package-manager). You can see an example in our [repository](/llbuild.yaml). Essentially, this file contains the compile/link commands for building the swift module.
Finally, we call `swift-build-tool -f /path/to/llbuild.yaml`.
## Boostrapping
In addition to building, we can choose to (only) emit the llbuild.yaml file, and save it for compiling later.
This is how we bootstrap atbuild, by creating an llbuild.yaml on a working machine and then using swift-build-tool on a new machine. For this reason, the `llbuild.yaml` file in this repository must be kept up to date.
\ No newline at end of file
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