Build specific Target instead of all

The main goal was to provide a bunch of simple binary entrypoints for splitting up simple tasks, sharing Packages and a shared package module.

Due we do not needall util binaryies on each server, a selectice build was decided. Because of the planned nature of the simple entry points utils, greate XXX git repositories for each entry point looks a litle bit overdone.

So on SERVER 1 we need only compile and install: UtilOne and UtilThree

On SERVER 2 we need only UtilThree

Assuming having not only three or four utils, maybe something beetween 30 and 50 utils ... splittet up to keep cmd line argument simple.

But maybe i'm missing the point ... or is it possible to something like this.







So we have to chage to Sources/UtilOne and run $ swift build and if needed for UtilTwo do the same.

But would this not end up in installing the references Packages dependenies ( like a mysql/cmysql packe) need in each util in following structure:







But what if we create for each entry point own package repositoreies and having a meta one with a simple Package.swift referencing all UtilPackages.

But still, how to accomplis only building a specific package on a server instead of all ?

Need to dig in some more playing, but currently it seems that there is no way to keep the simple stuff simple and no way to simply or minimize the need of indepenent git repositories ...


-----Ursprüngliche Nachricht-----
Von: David Turnbull <>
Gesendet: Son 31 Januar 2016 20:32
An: Stefan Bürk <>
CC: List, Swift - Community Users ( <>
Betreff: Re: [swift-users] Build specific Target instead of all

Each target ends up being a module and won't recompile unless it's changed so I'm not actually sure what your goal is. But making three more packages instead of targets will have the effect you ask for.

-david GitHub - AE9RB/SwiftGL: This project has moved.

On Sun, Jan 31, 2016 at 11:22 AM, Stefan Bürk < <> > wrote:
Hi everyone,

I'm searching for a way to build only a specific Target(chain) instead of all targets in one build run.



Content of Packages.swift

import PackageDescription

let package = Package(
name: "ProjectName",
targets: [
name: "UtilOne",
name: "UtilTwo",
name: "UtilThree",
dependencies: [
.Target(name: "UtilOne")

dependencies: \[\]


For building the project:

$ swift build

This will build all three targets in one run.

What i need is to build a specific target, for example "UtilOne", which only builds the binary for UtilOne.

Or how to build two targets instead of all threes ?

Building target "UtilThree" should build UtilOne, because of the dependencies definition, but not UtilTwo.

I couldnot found any documentation or way to get behind this, is there a way to get this work ?

Freundliche Grüße

Stefan Bürk GmbH
Hirschstr. 8
70173 Stuttgart

Fon +49-711-252698-00
Fax +49-711-252698-90 <> < <> > < >

Sitz Stuttgart, Amtsgericht Stuttgart, HRB 745476
Geschäftsführer: Bernard Cagalj

Die Mitteilung dieser E-Mail ist vertraulich und nur für den oben
genannten Empfänger bestimmt. Wenn Sie nicht der vorgesehene
Empfänger dieser E-Mail oder mit der Aushändigung an ihn betraut
sind, weisen wir darauf hin, dass jede Form der Kenntnisnahme,
Veröffentlichung, Vervielfältigung sowie Weitergabe des Inhalts
untersagt ist. Wir bitten Sie uns in diesem Fall zu unterrichten.
Vielen Dank!

The information contained in this E-Mail is privileged and
confidental intended only for the use of the individual or entity
named above. If the reader of this message is not the intended
recipient or competent to deliver it to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this E-Mail is strictly prohibited. If you have
received this E-Mail in error, please notify us immediately.
Thank you!
swift-users mailing list <>

I have git repositories with only three or four lines of significant code.
That's what we have to do today. Sometimes I think this is a devious design
to fill up GitHub with Swift projects.



On Sun, Jan 31, 2016 at 12:10 PM, Stefan Bürk <> wrote:

create XXX git repositories for each entry point looks a litle bit