2012-01-25 04:57:43 +01:00
|
|
|
diff --git a/src/cmd/go/build.go b/src/cmd/go/build.go
|
2012-03-06 05:25:38 +01:00
|
|
|
index cf249cd..56c540f 100644
|
2012-01-25 04:57:43 +01:00
|
|
|
--- a/src/cmd/go/build.go
|
|
|
|
+++ b/src/cmd/go/build.go
|
2012-03-06 05:25:38 +01:00
|
|
|
@@ -85,6 +85,7 @@ func init() {
|
2012-01-28 17:28:41 +01:00
|
|
|
}
|
2012-01-25 04:57:43 +01:00
|
|
|
|
2012-01-28 17:28:41 +01:00
|
|
|
// Flags set by multiple commands.
|
|
|
|
+var buildS bool // OPENSUSE -s (for packaging only)
|
|
|
|
var buildA bool // -a flag
|
|
|
|
var buildN bool // -n flag
|
|
|
|
var buildP = runtime.NumCPU() // -p flag
|
2012-03-06 05:25:38 +01:00
|
|
|
@@ -101,6 +102,10 @@ var buildContext = build.Default
|
2012-01-28 17:28:41 +01:00
|
|
|
// addBuildFlags adds the flags common to the build and install commands.
|
|
|
|
func addBuildFlags(cmd *Command) {
|
2012-03-06 05:25:38 +01:00
|
|
|
// NOTE: If you add flags here, also add them to testflag.go.
|
|
|
|
+
|
2012-01-25 04:57:43 +01:00
|
|
|
+ // OPENSUSE
|
|
|
|
+ cmd.Flag.BoolVar(&buildS, "s", false, "")
|
2012-02-04 11:55:47 +01:00
|
|
|
+
|
2012-01-28 17:28:41 +01:00
|
|
|
cmd.Flag.BoolVar(&buildA, "a", false, "")
|
|
|
|
cmd.Flag.BoolVar(&buildN, "n", false, "")
|
|
|
|
cmd.Flag.IntVar(&buildP, "p", buildP, "")
|
2012-03-06 05:25:38 +01:00
|
|
|
@@ -714,6 +719,12 @@ func (b *builder) build(a *action) error {
|
2012-01-25 04:57:43 +01:00
|
|
|
|
2012-02-04 11:55:47 +01:00
|
|
|
// install is the action for installing a single package or executable.
|
|
|
|
func (b *builder) install(a *action) error {
|
|
|
|
+
|
|
|
|
+ // OPENSUSE
|
|
|
|
+ if buildS && (a.p.Standard || a.p.ImportPath == "cmd/cgo") {
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
a1 := a.deps[0]
|
|
|
|
perm := os.FileMode(0666)
|
|
|
|
if a1.link {
|