Skip to content

Commit 5d76d3d

Browse files
committed
Makefile: support passing build tags via environment
build tags can be passed via GO_BUILDTAGS environment variable. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
1 parent 0701e9b commit 5d76d3d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
1514
PACKAGES=$(shell go list ./... | grep -v /vendor/)
15+
GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(strip $(GO_BUILDTAGS))",)
1616

1717
all: cgutil
18-
go build -v
18+
go build -v $(GO_TAGS)
1919

2020
cgutil:
21-
cd cmd/cgctl && go build -v
21+
cd cmd/cgctl && go build -v $(GO_TAGS)
2222

2323
proto:
2424
protobuild --quiet ${PACKAGES}

0 commit comments

Comments
 (0)