Merge "make: only build binaries and their dependencies."

This commit is contained in:
Brad Fitzpatrick 2014-02-21 19:32:12 +00:00 committed by Gerrit Code Review
commit 14ef41c0ad
1 changed files with 7 additions and 2 deletions

View File

@ -53,7 +53,7 @@ var (
all = flag.Bool("all", false, "Force rebuild of everything (go install -a)")
race = flag.Bool("race", false, "Build race-detector version of binaries (they will run slowly)")
verbose = flag.Bool("v", false, "Verbose mode")
targets = flag.String("targets", "", "Optional comma-separated list of targets (i.e go packages) to build and install. Empty means all. Example: camlistore.org/server/camlistored,camlistore.org/cmd/camput")
targets = flag.String("targets", "", "Optional comma-separated list of targets (i.e go packages) to build and install. '*' builds everything. Empty builds defaults for this platform. Example: camlistore.org/server/camlistored,camlistore.org/cmd/camput")
quiet = flag.Bool("quiet", false, "Don't print anything unless there's a failure.")
onlysync = flag.Bool("onlysync", false, "Only populate the temporary source/build tree and output its full path. It is meant to prepare the environment for running the full test suite with 'devcam test'.")
// TODO(mpl): looks like ifModsSince is not used anywhere?
@ -169,7 +169,12 @@ func main() {
"camlistore.org/cmd/camtool",
"camlistore.org/server/camlistored",
}
if *targets != "" {
switch *targets {
case "*":
buildAll = true
case "":
buildAll = false
default:
if t := strings.Split(*targets, ","); len(t) != 0 {
targs = t
buildAll = false