Skip to content

Exclude all #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Sources/Multitool/Toolchain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import POSIX
// when in Xcode we are built with same toolchain as we will run
// this is not a production ready mode

public let SWIFT_EXEC = getenv("SWIFT_EXEC")!.abspath()
public let llbuild = Path.join(getenv("SWIFT_EXEC")!, "../swift-build-tool").abspath()
public let SWIFT_EXEC = getenv("SWIFT_EXEC")!.abspath
public let llbuild = Path.join(getenv("SWIFT_EXEC")!, "../swift-build-tool").abspath
public let libdir = argv0.parentDirectory
#else
public let SWIFT_EXEC = Path.join(argv0, "../swiftc").abspath()
public let llbuild = Path.join(argv0, "../swift-build-tool").abspath()
public let libdir = Path.join(argv0, "../../lib/swift/pm").abspath()
public let SWIFT_EXEC = Path.join(argv0, "../swiftc").abspath
public let llbuild = Path.join(argv0, "../swift-build-tool").abspath
public let libdir = Path.join(argv0, "../../lib/swift/pm").abspath
#endif
4 changes: 4 additions & 0 deletions Sources/Transmute/Package+modules.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ extension Package {
return [try CModule(name: name, path: path, pkgConfig: manifest.package.pkgConfig, providers: manifest.package.providers)]
}

if manifest.package.exclude.contains(".") {
return []
}

let srcroot = try sourceRoot()

if srcroot != path {
Expand Down
6 changes: 3 additions & 3 deletions Sources/Utility/Path.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ public struct Path {
// The above function requires both paths to be either relative
// or absolute. So if they differ we make them both absolute.
if abs.0 != abs.1 {
if !abs.path { path = path.abspath() }
if !abs.pivot { pivot = pivot.abspath() }
if !abs.path { path = path.abspath }
if !abs.pivot { pivot = pivot.abspath }
}

return go(clean(string), clean(pivot))
Expand Down Expand Up @@ -199,7 +199,7 @@ extension String {

Path.join(getcwd(), self).normpath
*/
public func abspath() -> String {
public var abspath: String {
return Path.join(getcwd(), self).normpath
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/swift-build/UserToolchain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct UserToolchain: Toolchain {
do {
SWIFT_EXEC = getenv("SWIFT_EXEC")
// use the swiftc installed alongside ourselves
?? Path.join(Process.arguments[0], "../swiftc").abspath()
?? Path.join(Process.arguments[0], "../swiftc").abspath

clang = try getenv("CC") ?? POSIX.popen(whichClangArgs).chomp()

Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/Utilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func swiftBuildPath() -> String {
}
fatalError()
#else
return Path.join(Process.arguments.first!.abspath().parentDirectory, "swift-build")
return Path.join(Process.arguments.first!.abspath.parentDirectory, "swift-build")
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions Tests/ManifestParser/ManifestTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class ManifestTests: XCTestCase {
#endif
let libdir = bundleRoot()
#else
let libdir = Process.arguments.first!.parentDirectory.abspath()
let swiftc = Path.join(Process.arguments.first!, "../swiftc").abspath()
let libdir = Process.arguments.first!.parentDirectory.abspath
let swiftc = Path.join(Process.arguments.first!, "../swiftc").abspath
#endif

private func loadManifest(_ inputName: String, line: UInt = #line, body: (Manifest) -> Void) {
Expand Down