Remove duplicate plugins make action 79/76379/1
authorVictor Morales <victor.morales@intel.com>
Fri, 25 Jan 2019 16:46:51 +0000 (08:46 -0800)
committerVictor Morales <victor.morales@intel.com>
Fri, 25 Jan 2019 16:46:51 +0000 (08:46 -0800)
The action which compiles all the plugins is duplicated in the
Makefile. This change remove that duplication to define a
consistent build process.

Change-Id: I0efecdcb70052b4c0d66102c56e0c715481cb34a
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-ID: MULTICLOUD-301

src/k8splugin/Makefile

index 751cd5f..635c915 100644 (file)
@@ -15,9 +15,8 @@ export GO111MODULE=on
 .PHONY: plugins
 
 
-all: clean
+all: clean plugins
        CGO_ENABLED=1 GOOS=linux GOARCH=amd64
-       @find plugins -type d -not -path plugins -exec sh -c "ls {}/plugin.go | xargs go build -buildmode=plugin -a -tags netgo -o $(basename {}).so" \;
        @go build -a -tags netgo -o ./k8plugin ./cmd/main.go
 
 # The following is done this way as each patch on CI runs build and each merge runs deploy. So for build we don't need to build binary and hence
@@ -47,7 +46,7 @@ plugins:
        @find plugins -maxdepth 1 -type d -not -path plugins -exec sh -c "ls {}/plugin.go | xargs go build -buildmode=plugin -o $(basename {}).so" \;
 
 clean:
-       find . -name "*so" -delete
+       @find . -name "*so" -delete
        @rm -f k8plugin
 
 .PHONY: cover