Makefile 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. # Copyright 2016 The Kubernetes Authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. DBG_MAKEFILE ?=
  15. ifeq ($(DBG_MAKEFILE),1)
  16. $(warning ***** starting Makefile for goal(s) "$(MAKECMDGOALS)")
  17. $(warning ***** $(shell date))
  18. else
  19. # If we're not debugging the Makefile, don't echo recipes.
  20. MAKEFLAGS += -s
  21. endif
  22. # Old-skool build tools.
  23. #
  24. # Commonly used targets (see each target for more information):
  25. # all: Build code.
  26. # test: Run tests.
  27. # clean: Clean up.
  28. # It's necessary to set this because some environments don't link sh -> bash.
  29. SHELL := /bin/bash
  30. # We don't need make's built-in rules.
  31. MAKEFLAGS += --no-builtin-rules
  32. .SUFFIXES:
  33. # Constants used throughout.
  34. .EXPORT_ALL_VARIABLES:
  35. OUT_DIR ?= _output
  36. BIN_DIR := $(OUT_DIR)/bin
  37. PRJ_SRC_PATH := k8s.io/kubernetes
  38. GENERATED_FILE_PREFIX := zz_generated.
  39. # Metadata for driving the build lives here.
  40. META_DIR := .make
  41. ifdef KUBE_GOFLAGS
  42. $(info KUBE_GOFLAGS is now deprecated. Please use GOFLAGS instead.)
  43. ifndef GOFLAGS
  44. GOFLAGS := $(KUBE_GOFLAGS)
  45. unexport KUBE_GOFLAGS
  46. else
  47. $(error Both KUBE_GOFLAGS and GOFLAGS are set. Please use just GOFLAGS)
  48. endif
  49. endif
  50. # Extra options for the release or quick-release options:
  51. KUBE_RELEASE_RUN_TESTS := $(KUBE_RELEASE_RUN_TESTS)
  52. KUBE_FASTBUILD := $(KUBE_FASTBUILD)
  53. # This controls the verbosity of the build. Higher numbers mean more output.
  54. KUBE_VERBOSE ?= 1
  55. define ALL_HELP_INFO
  56. # Build code.
  57. #
  58. # Args:
  59. # WHAT: Directory names to build. If any of these directories has a 'main'
  60. # package, the build will produce executable files under $(OUT_DIR)/go/bin.
  61. # If not specified, "everything" will be built.
  62. # GOFLAGS: Extra flags to pass to 'go' when building.
  63. # GOLDFLAGS: Extra linking flags passed to 'go' when building.
  64. # GOGCFLAGS: Additional go compile flags passed to 'go' when building.
  65. #
  66. # Example:
  67. # make
  68. # make all
  69. # make all WHAT=cmd/kubelet GOFLAGS=-v
  70. # make all GOLDFLAGS=""
  71. # Note: Specify GOLDFLAGS as an empty string for building unstripped binaries, which allows
  72. # you to use code debugging tools like delve. When GOLDFLAGS is unspecified, it defaults
  73. # to "-s -w" which strips debug information. Other flags that can be used for GOLDFLAGS
  74. # are documented at https://golang.org/cmd/link/
  75. endef
  76. .PHONY: all
  77. ifeq ($(PRINT_HELP),y)
  78. all:
  79. @echo "$$ALL_HELP_INFO"
  80. else
  81. all: generated_files
  82. hack/make-rules/build.sh $(WHAT)
  83. endif
  84. define GINKGO_HELP_INFO
  85. # Build ginkgo
  86. #
  87. # Example:
  88. # make ginkgo
  89. endef
  90. .PHONY: ginkgo
  91. ifeq ($(PRINT_HELP),y)
  92. ginkgo:
  93. @echo "$$GINKGO_HELP_INFO"
  94. else
  95. ginkgo:
  96. hack/make-rules/build.sh vendor/github.com/onsi/ginkgo/ginkgo
  97. endif
  98. define VERIFY_HELP_INFO
  99. # Runs all the presubmission verifications.
  100. #
  101. # Args:
  102. # BRANCH: Branch to be passed to verify-vendor.sh script.
  103. # WHAT: List of checks to run
  104. #
  105. # Example:
  106. # make verify
  107. # make verify BRANCH=branch_x
  108. # make verify WHAT="bazel typecheck"
  109. endef
  110. .PHONY: verify
  111. ifeq ($(PRINT_HELP),y)
  112. verify:
  113. @echo "$$VERIFY_HELP_INFO"
  114. else
  115. verify:
  116. KUBE_VERIFY_GIT_BRANCH=$(BRANCH) hack/make-rules/verify.sh
  117. endif
  118. define QUICK_VERIFY_HELP_INFO
  119. # Runs only the presubmission verifications that aren't slow.
  120. #
  121. # Example:
  122. # make quick-verify
  123. endef
  124. .PHONY: quick-verify
  125. ifeq ($(PRINT_HELP),y)
  126. quick-verify:
  127. @echo "$$QUICK_VERIFY_HELP_INFO"
  128. else
  129. quick-verify:
  130. QUICK=true SILENT=false hack/make-rules/verify.sh
  131. endif
  132. define UPDATE_HELP_INFO
  133. # Runs all the generated updates.
  134. #
  135. # Example:
  136. # make update
  137. endef
  138. .PHONY: update
  139. ifeq ($(PRINT_HELP),y)
  140. update:
  141. @echo "$$UPDATE_HELP_INFO"
  142. else
  143. update: generated_files
  144. CALLED_FROM_MAIN_MAKEFILE=1 hack/make-rules/update.sh
  145. endif
  146. define CHECK_TEST_HELP_INFO
  147. # Build and run tests.
  148. #
  149. # Args:
  150. # WHAT: Directory names to test. All *_test.go files under these
  151. # directories will be run. If not specified, "everything" will be tested.
  152. # TESTS: Same as WHAT.
  153. # KUBE_COVER: Whether to run tests with code coverage. Set to 'y' to enable coverage collection.
  154. # GOFLAGS: Extra flags to pass to 'go' when building.
  155. # GOLDFLAGS: Extra linking flags to pass to 'go' when building.
  156. # GOGCFLAGS: Additional go compile flags passed to 'go' when building.
  157. #
  158. # Example:
  159. # make check
  160. # make test
  161. # make check WHAT=./pkg/kubelet GOFLAGS=-v
  162. endef
  163. .PHONY: check test
  164. ifeq ($(PRINT_HELP),y)
  165. check test:
  166. @echo "$$CHECK_TEST_HELP_INFO"
  167. else
  168. check test: generated_files
  169. hack/make-rules/test.sh $(WHAT) $(TESTS)
  170. endif
  171. define TEST_IT_HELP_INFO
  172. # Build and run integration tests.
  173. #
  174. # Args:
  175. # WHAT: Directory names to test. All *_test.go files under these
  176. # directories will be run. If not specified, "everything" will be tested.
  177. #
  178. # Example:
  179. # make test-integration
  180. endef
  181. .PHONY: test-integration
  182. ifeq ($(PRINT_HELP),y)
  183. test-integration:
  184. @echo "$$TEST_IT_HELP_INFO"
  185. else
  186. test-integration: generated_files
  187. hack/make-rules/test-integration.sh $(WHAT)
  188. endif
  189. define TEST_E2E_NODE_HELP_INFO
  190. # Build and run node end-to-end tests.
  191. #
  192. # Args:
  193. # FOCUS: Regexp that matches the tests to be run. Defaults to "".
  194. # SKIP: Regexp that matches the tests that needs to be skipped. Defaults
  195. # to "".
  196. # RUN_UNTIL_FAILURE: If true, pass --untilItFails to ginkgo so tests are run
  197. # repeatedly until they fail. Defaults to false.
  198. # REMOTE: If true, run the tests on a remote host instance on GCE. Defaults
  199. # to false.
  200. # IMAGES: For REMOTE=true only. Comma delimited list of images for creating
  201. # remote hosts to run tests against. Defaults to a recent image.
  202. # LIST_IMAGES: If true, don't run tests. Just output the list of available
  203. # images for testing. Defaults to false.
  204. # HOSTS: For REMOTE=true only. Comma delimited list of running gce hosts to
  205. # run tests against. Defaults to "".
  206. # DELETE_INSTANCES: For REMOTE=true only. Delete any instances created as
  207. # part of this test run. Defaults to false.
  208. # PREEMPTIBLE_INSTANCES: For REMOTE=true only. Mark created gce instances
  209. # as preemptible. Defaults to false.
  210. # ARTIFACTS: For REMOTE=true only. Local directory to scp test artifacts into
  211. # from the remote hosts. Defaults to "/tmp/_artifacts".
  212. # REPORT: For REMOTE=false only. Local directory to write juntil xml results
  213. # to. Defaults to "/tmp/".
  214. # CLEANUP: For REMOTE=true only. If false, do not stop processes or delete
  215. # test files on remote hosts. Defaults to true.
  216. # IMAGE_PROJECT: For REMOTE=true only. Project containing images provided to
  217. # IMAGES. Defaults to "kubernetes-node-e2e-images".
  218. # INSTANCE_PREFIX: For REMOTE=true only. Instances created from images will
  219. # have the name "${INSTANCE_PREFIX}-${IMAGE_NAME}". Defaults to "test".
  220. # INSTANCE_METADATA: For REMOTE=true and running on GCE only.
  221. # GUBERNATOR: For REMOTE=true only. Produce link to Gubernator to view logs.
  222. # Defaults to false.
  223. # PARALLELISM: The number of gingko nodes to run. Defaults to 8.
  224. # RUNTIME: Container runtime to use (eg. docker, remote).
  225. # Defaults to "docker".
  226. # CONTAINER_RUNTIME_ENDPOINT: remote container endpoint to connect to.
  227. # Used when RUNTIME is set to "remote".
  228. # IMAGE_SERVICE_ENDPOINT: remote image endpoint to connect to, to prepull images.
  229. # Used when RUNTIME is set to "remote".
  230. # IMAGE_CONFIG_FILE: path to a file containing image configuration.
  231. # SYSTEM_SPEC_NAME: The name of the system spec to be used for validating the
  232. # image in the node conformance test. The specs are located at
  233. # test/e2e_node/system/specs/. For example, "SYSTEM_SPEC_NAME=gke" will use
  234. # the spec at test/e2e_node/system/specs/gke.yaml. If unspecified, the
  235. # default built-in spec (system.DefaultSpec) will be used.
  236. #
  237. # Example:
  238. # make test-e2e-node FOCUS=Kubelet SKIP=container
  239. # make test-e2e-node REMOTE=true DELETE_INSTANCES=true
  240. # make test-e2e-node TEST_ARGS='--kubelet-flags="--cgroups-per-qos=true"'
  241. # Build and run tests.
  242. endef
  243. .PHONY: test-e2e-node
  244. ifeq ($(PRINT_HELP),y)
  245. test-e2e-node:
  246. @echo "$$TEST_E2E_NODE_HELP_INFO"
  247. else
  248. test-e2e-node: ginkgo generated_files
  249. hack/make-rules/test-e2e-node.sh
  250. endif
  251. define TEST_E2E_KUBEADM_HELP_INFO
  252. # Build and run kubeadm end-to-end tests.
  253. #
  254. # Args:
  255. # FOCUS: Regexp that matches the tests to be run. Defaults to "".
  256. # SKIP: Regexp that matches the tests that needs to be skipped. Defaults
  257. # to "".
  258. # RUN_UNTIL_FAILURE: If true, pass --untilItFails to ginkgo so tests are run
  259. # repeatedly until they fail. Defaults to false.
  260. # ARTIFACTS: Local directory to save test artifacts into. Defaults to "/tmp/_artifacts".
  261. # PARALLELISM: The number of gingko nodes to run. If empty ginkgo default
  262. # parallelism (cores - 1) is used
  263. # BUILD: Build kubeadm end-to-end tests. Defaults to true.
  264. #
  265. # Example:
  266. # make test-e2e-kubeadm
  267. # make test-e2e-kubeadm FOCUS=kubeadm-config
  268. # make test-e2e-kubeadm SKIP=kubeadm-config
  269. #
  270. # Build and run tests.
  271. endef
  272. .PHONY: test-e2e-kubeadm
  273. ifeq ($(PRINT_HELP),y)
  274. test-e2e-kubeadm:
  275. @echo "$$TEST_E2E_KUBEADM_HELP_INFO"
  276. else
  277. test-e2e-kubeadm:
  278. hack/make-rules/test-e2e-kubeadm.sh
  279. endif
  280. define TEST_CMD_HELP_INFO
  281. # Build and run cmdline tests.
  282. #
  283. # Args:
  284. # WHAT: List of tests to run, check test/cmd/legacy-script.sh for names.
  285. # For example, WHAT=deployment will run run_deployment_tests function.
  286. # Example:
  287. # make test-cmd
  288. # make test-cmd WHAT="deployment impersonation"
  289. endef
  290. .PHONY: test-cmd
  291. ifeq ($(PRINT_HELP),y)
  292. test-cmd:
  293. @echo "$$TEST_CMD_HELP_INFO"
  294. else
  295. test-cmd: generated_files
  296. hack/make-rules/test-cmd.sh
  297. endif
  298. define CLEAN_HELP_INFO
  299. # Remove all build artifacts.
  300. #
  301. # Example:
  302. # make clean
  303. #
  304. # TODO(thockin): call clean_generated when we stop committing generated code.
  305. endef
  306. .PHONY: clean
  307. ifeq ($(PRINT_HELP),y)
  308. clean:
  309. @echo "$$CLEAN_HELP_INFO"
  310. else
  311. clean: clean_meta
  312. build/make-clean.sh
  313. hack/make-rules/clean.sh
  314. endif
  315. define CLEAN_META_HELP_INFO
  316. # Remove make-related metadata files.
  317. #
  318. # Example:
  319. # make clean_meta
  320. endef
  321. .PHONY: clean_meta
  322. ifeq ($(PRINT_HELP),y)
  323. clean_meta:
  324. @echo "$$CLEAN_META_HELP_INFO"
  325. else
  326. clean_meta:
  327. rm -rf $(META_DIR)
  328. endif
  329. define CLEAN_GENERATED_HELP_INFO
  330. # Remove all auto-generated artifacts. Generated artifacts in staging folder should not be removed as they are not
  331. # generated using generated_files.
  332. #
  333. # Example:
  334. # make clean_generated
  335. endef
  336. .PHONY: clean_generated
  337. ifeq ($(PRINT_HELP),y)
  338. clean_generated:
  339. @echo "$$CLEAN_GENERATED_HELP_INFO"
  340. else
  341. clean_generated:
  342. find . -type f -name $(GENERATED_FILE_PREFIX)\* | grep -v "[.]/staging/.*" | xargs rm -f
  343. endif
  344. define VET_HELP_INFO
  345. # Run 'go vet'.
  346. #
  347. # Args:
  348. # WHAT: Directory names to vet. All *.go files under these
  349. # directories will be vetted. If not specified, "everything" will be
  350. # vetted.
  351. #
  352. # Example:
  353. # make vet
  354. # make vet WHAT=./pkg/kubelet
  355. endef
  356. .PHONY: vet
  357. ifeq ($(PRINT_HELP),y)
  358. vet:
  359. @echo "$$VET_HELP_INFO"
  360. else
  361. vet: generated_files
  362. CALLED_FROM_MAIN_MAKEFILE=1 hack/make-rules/vet.sh $(WHAT)
  363. endif
  364. define RELEASE_HELP_INFO
  365. # Build a release
  366. # Use the 'release-in-a-container' target to build the release when already in
  367. # a container vs. creating a new container to build in using the 'release'
  368. # target. Useful for running in GCB.
  369. #
  370. # Example:
  371. # make release
  372. # make release-in-a-container
  373. endef
  374. .PHONY: release release-in-a-container
  375. ifeq ($(PRINT_HELP),y)
  376. release release-in-a-container:
  377. @echo "$$RELEASE_HELP_INFO"
  378. else
  379. release:
  380. build/release.sh
  381. release-in-a-container:
  382. build/release-in-a-container.sh
  383. endif
  384. define RELEASE_IMAGES_HELP_INFO
  385. # Build release images
  386. #
  387. # Args:
  388. # KUBE_BUILD_CONFORMANCE: Whether to build conformance testing image as well. Set to 'n' to skip.
  389. #
  390. # Example:
  391. # make release-images
  392. endef
  393. .PHONY: release-images
  394. ifeq ($(PRINT_HELP),y)
  395. release-images:
  396. @echo "$$RELEASE_IMAGES_HELP_INFO"
  397. else
  398. release-images:
  399. build/release-images.sh
  400. endif
  401. define RELEASE_SKIP_TESTS_HELP_INFO
  402. # Build a release, but skip tests
  403. #
  404. # Args:
  405. # KUBE_RELEASE_RUN_TESTS: Whether to run tests. Set to 'y' to run tests anyways.
  406. # KUBE_FASTBUILD: Whether to cross-compile for other architectures. Set to 'false' to do so.
  407. # KUBE_DOCKER_REGISTRY: Registry of released images, default to k8s.gcr.io
  408. # KUBE_BASE_IMAGE_REGISTRY: Registry of base images for controlplane binaries, default to k8s.gcr.io
  409. #
  410. # Example:
  411. # make release-skip-tests
  412. # make quick-release
  413. endef
  414. .PHONY: release-skip-tests quick-release
  415. ifeq ($(PRINT_HELP),y)
  416. release-skip-tests quick-release:
  417. @echo "$$RELEASE_SKIP_TESTS_HELP_INFO"
  418. else
  419. release-skip-tests quick-release: KUBE_RELEASE_RUN_TESTS = n
  420. release-skip-tests quick-release: KUBE_FASTBUILD = true
  421. release-skip-tests quick-release:
  422. build/release.sh
  423. endif
  424. define QUICK_RELEASE_IMAGES_HELP_INFO
  425. # Build release images, but only for linux/amd64
  426. #
  427. # Args:
  428. # KUBE_FASTBUILD: Whether to cross-compile for other architectures. Set to 'false' to do so.
  429. # KUBE_BUILD_CONFORMANCE: Whether to build conformance testing image as well. Set to 'n' to skip.
  430. #
  431. # Example:
  432. # make quick-release-images
  433. endef
  434. .PHONY: quick-release-images
  435. ifeq ($(PRINT_HELP),y)
  436. quick-release-images:
  437. @echo "$$QUICK_RELEASE_IMAGES_HELP_INFO"
  438. else
  439. quick-release-images: KUBE_FASTBUILD = true
  440. quick-release-images:
  441. build/release-images.sh
  442. endif
  443. define PACKAGE_HELP_INFO
  444. # Package tarballs
  445. # Use the 'package-tarballs' target to run the final packaging steps of
  446. # a release.
  447. #
  448. # Example:
  449. # make package-tarballs
  450. endef
  451. .PHONY: package package-tarballs
  452. ifeq ($(PRINT_HELP),y)
  453. package package-tarballs:
  454. @echo "$$PACKAGE_HELP_INFO"
  455. else
  456. package package-tarballs:
  457. build/package-tarballs.sh
  458. endif
  459. define CROSS_HELP_INFO
  460. # Cross-compile for all platforms
  461. # Use the 'cross-in-a-container' target to cross build when already in
  462. # a container vs. creating a new container to build from (build-image)
  463. # Useful for running in GCB.
  464. #
  465. # Example:
  466. # make cross
  467. # make cross-in-a-container
  468. endef
  469. .PHONY: cross cross-in-a-container
  470. ifeq ($(PRINT_HELP),y)
  471. cross cross-in-a-container:
  472. @echo "$$CROSS_HELP_INFO"
  473. else
  474. cross:
  475. hack/make-rules/cross.sh
  476. cross-in-a-container: KUBE_OUTPUT_SUBPATH = $(OUT_DIR)/dockerized
  477. cross-in-a-container:
  478. ifeq (,$(wildcard /.dockerenv))
  479. @echo -e "\nThe 'cross-in-a-container' target can only be used from within a docker container.\n"
  480. else
  481. hack/make-rules/cross.sh
  482. endif
  483. endif
  484. define CMD_HELP_INFO
  485. # Add rules for all directories in cmd/
  486. #
  487. # Example:
  488. # make kubectl kube-proxy
  489. endef
  490. #TODO: make EXCLUDE_TARGET auto-generated when there are other files in cmd/
  491. EXCLUDE_TARGET=BUILD OWNERS
  492. .PHONY: $(filter-out %$(EXCLUDE_TARGET),$(notdir $(abspath $(wildcard cmd/*/))))
  493. ifeq ($(PRINT_HELP),y)
  494. $(filter-out %$(EXCLUDE_TARGET),$(notdir $(abspath $(wildcard cmd/*/)))):
  495. @echo "$$CMD_HELP_INFO"
  496. else
  497. $(filter-out %$(EXCLUDE_TARGET),$(notdir $(abspath $(wildcard cmd/*/)))): generated_files
  498. hack/make-rules/build.sh cmd/$@
  499. endif
  500. define GENERATED_FILES_HELP_INFO
  501. # Produce auto-generated files needed for the build.
  502. #
  503. # Example:
  504. # make generated_files
  505. endef
  506. .PHONY: generated_files
  507. ifeq ($(PRINT_HELP),y)
  508. generated_files:
  509. @echo "$$GENERATED_FILES_HELP_INFO"
  510. else
  511. generated_files gen_openapi:
  512. $(MAKE) -f Makefile.generated_files $@ CALLED_FROM_MAIN_MAKEFILE=1
  513. endif
  514. define HELP_INFO
  515. # Print make targets and help info
  516. #
  517. # Example:
  518. # make help
  519. endef
  520. .PHONY: help
  521. ifeq ($(PRINT_HELP),y)
  522. help:
  523. @echo "$$HELP_INFO"
  524. else
  525. help:
  526. hack/make-rules/make-help.sh
  527. endif
  528. # Non-dockerized bazel rules.
  529. .PHONY: bazel-build bazel-test bazel-release
  530. ifeq ($(PRINT_HELP),y)
  531. define BAZEL_BUILD_HELP_INFO
  532. # Build with bazel
  533. #
  534. # Example:
  535. # make bazel-build
  536. endef
  537. bazel-build:
  538. @echo "$$BAZEL_BUILD_HELP_INFO"
  539. else
  540. # Some things in vendor don't build due to empty target lists for cross-platform rules.
  541. bazel-build:
  542. bazel build -- //... -//vendor/...
  543. endif
  544. ifeq ($(PRINT_HELP),y)
  545. define BAZEL_TEST_HELP_INFO
  546. # Test with bazel
  547. #
  548. # Example:
  549. # make bazel-test
  550. endef
  551. bazel-test:
  552. @echo "$$BAZEL_TEST_HELP_INFO"
  553. else
  554. # //hack:verify-all is a manual target.
  555. # Some things in vendor don't build due to empty target lists for cross-platform rules.
  556. bazel-test:
  557. bazel test --config=unit -- \
  558. //... \
  559. //hack:verify-all \
  560. -//vendor/...
  561. endif
  562. ifeq ($(PRINT_HELP),y)
  563. define BAZEL_TEST_INTEGRATION_HELP_INFO
  564. # Integration test with bazel
  565. #
  566. # Example:
  567. # make bazel-test-integration
  568. endef
  569. bazel-test-integration:
  570. @echo "$$BAZEL_TEST_INTEGRATION_HELP_INFO"
  571. else
  572. bazel-test-integration:
  573. bazel test --config integration //test/integration/...
  574. endif
  575. ifeq ($(PRINT_HELP),y)
  576. define BAZEL_RELEASE_HELP_INFO
  577. # Build release tars with bazel
  578. #
  579. # Example:
  580. # make bazel-release
  581. endef
  582. bazel-release:
  583. @echo "$$BAZEL_RELEASE_HELP_INFO"
  584. else
  585. bazel-release:
  586. bazel build //build/release-tars
  587. bazel shutdown || true
  588. pkill ^bazel || true
  589. endif