Commit 772b1c52 authored by David Owens II's avatar David Owens II

Initial check-in of the model layer. Also included what will be the build file: atbuild.atpkg

parent 3b08b1a8
Pipeline #672 passed with stage
;; Copyright (c) 2016 Anarchy Tools Contributors.
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; http:;;www.apache.org/licenses/LICENSE-2.0
;;
;; Unless required by applicable law or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;; The build file for all of the targets of the Anarchy Tools build tool.
(defpackage
:name "atbuild"
:tasks {:hellworld {:tool "shell"
:script "echo \"Hello world\"" }
:default {:dependencies ["yaml"]
:tool "atllbuild"
:source ["cli/src/**.swift"]
:name "atbuild"
:outputType "executable"
:linkWithProduct: ["yaml.a"]}
:bootstrap-osx {:dependencies ["bootstrap-yaml-osx"]
:tool "atllbuild"
:source ["cli/src/**.swift"]
:name "atbuild"
:bootstrapOnly true
:llbuildyaml: "llbuild-osx.yaml"
:outputType "executable"
:linkWithProduct ["yaml.a"]}
:bootstrap-linux {:dependencies ["bootstrap-yaml-linux"]
:tool "atllbuild"
:source ["cli/src/**.swift"]
:name "atbuild"
:bootstrapOnly true
:llbuildyaml: "llbuild-linux.yaml"
:linkSDK false
:compileOptions ["-D" "CORELIBS_FOUNDATION"]
:outputType "executable"
:linkWithProduct ["yaml.a"]}
:bootstrap {:dependencies ["bootstrap-osx", "bootstrap-linux"]
:tool "nop"}
:yaml {:tool "atllbuild"
:source ["parsers/yaml/**.swift"]
:name "yaml"
:outputType "static-library"}
:atpkg-model {:tool "atllbuild"
:source ["model/src/**.swift"]
:name "atpkgmodel"
:outputType "static-library"}
:atpkg-parser {:dependencies ["atpkg-model"]
:tool "atllbuild"
:source ["parsers/atpkg/src/**.swift"]
:name "atpkgparser"
:outputType "static-library"
:linkWithProduct ["atpkgmodel.a"]}
:atpkg-tests {:dependencies ["atpkg-parser"]
:tool "atllbuild"
:source ["parsers/atpkg/tests/**.swift"]
:name "atpkgtests"
:outputType "executable"
:linkWithProduct ["atpkparser.a"]}
:run-atpkg-tests {:dependencies ["atpkg-tests"]
:tool "shell"
:script "./.atllbuild/products/atpkgtests"}
:run-tests {:dependencies ["run-atpkg-tests"]
:tool "nop" }
)
......@@ -46,11 +46,19 @@ tasks:
name: "yaml"
outputType: "static-library"
atpkg-model:
tool: "atllbuild"
source: ["model/src/**.swift"]
name: "atpkgmodel"
outputType: "static-library"
atpkg-parser:
dependency: ["atpkg-model"]
tool: "atllbuild"
source: ["parsers/atpkg/src/**.swift"]
name: "atpkgparser"
outputType: "static-library"
linkWithProduct: ["atpkgmodel.a"]
atpkg-tests:
dependency: ["atpkg-parser"]
......
// Copyright (c) 2016 Anarchy Tools Contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
public enum OutputType {
case Executable
case StaticLibrary
case DynamicLibrary
}
public class FilePath {
var path: String
var expandedItems: [String] {
get { return [] }
}
public init(path: String) {
self.path = path
}
}
public class Dependency {
public var name: String
public init(name: String) {
self.name = name
}
}
public class Task {
var dependencies: [Dependency] = []
var tool: String = "atllbuild"
var source: [FilePath] = []
var name: String
var bootstrapOnly: Bool = false
var llbuildyaml: String = ""
var linkSDK: Bool = false
var compilerOptions: [String] = []
var outputType: OutputType = OutputType.StaticLibrary
var linkWithProduct: [String] = []
public init(name: String) {
self.name = name
}
}
public class Package {
var name: String
var tasks: [Task] = []
public init(name: String) {
self.name = name
}
}
\ No newline at end of file
// Copyright (c) 2016 Anarchy Tools Contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import atpkgmodel
public class Parser {
}
\ 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