summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKubeEdge Bot <48982446+kubeedge-bot@users.noreply.github.com>2022-04-06 11:21:25 +0800
committerGitHub <noreply@github.com>2022-04-06 11:21:25 +0800
commit595c970b40cf3f6ea108e2f5ce10aa7170900a2c (patch)
treea4c487a781524d9ccdf139e4821e3e6e0b87793e /Makefile
parentMerge pull request #3742 from Shelley-BaoYue/master-errstatus (diff)
parentsupport compile binaries with golang images (diff)
downloadkubeedge-595c970b40cf3f6ea108e2f5ce10aa7170900a2c.tar.gz
Merge pull request #3756 from gy95/binary
support compile binaries with golang images
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4ec131fc5..784cd140e 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,8 @@ COMPONENTS=cloud \
.EXPORT_ALL_VARIABLES:
OUT_DIR ?= _output/local
+RUN = hack/make-rules/build_with_container.sh
+
define ALL_HELP_INFO
# Build code.
#
@@ -40,12 +42,20 @@ define ALL_HELP_INFO
# to "-N -l" to disable optimizations and inlining, this will be helpful when you want to
# use the debugging tools like delve. When GOLDFLAGS is unspecified, it defaults to "-s -w" which strips
# debug information, see https://golang.org/cmd/link for other flags.
+#
+# Set the environment variable or arg BUILD_WITH_CONTAINER to build inside container,
+# only docker and make are required in this mode.
+# 1) make all WHAT=cloudcore BUILD_WITH_CONTAINER=true
+# 2) export BUILD_WITH_CONTAINER=true && make all WHAT=cloudcore
endef
.PHONY: all
ifeq ($(HELP),y)
all: clean
@echo "$$ALL_HELP_INFO"
+else ifeq ($(BUILD_WITH_CONTAINER),true)
+all:
+ $(RUN) hack/make-rules/build.sh $(WHAT)
else
all:
KUBEEDGE_OUTPUT_SUBPATH=$(OUT_DIR) hack/make-rules/build.sh $(WHAT)