32 Star 154 Fork 0

百度开源/EasyFaaS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 2.47 KB
一键复制 编辑 原始数据 按行查看 历史
flyingfang 提交于 2021-04-12 15:30 +08:00 . modify code from openless to easyfaas
# It's necessary to set this because some environments don't link sh -> bash.
SHELL := /bin/bash
# We don't need make's built-in rules.
MAKEFLAGS += --no-builtin-rules
.SUFFIXES:
# Constants used throughout.
.EXPORT_ALL_VARIABLES:
OUT_DIR ?= _output
BIN_DIR := $(OUT_DIR)/bin
PRJ_SRC_PATH := github.com/baidu/easyfaas
GENERATED_FILE_PREFIX := zz_generated.
# Metadata for driving the build lives here.
META_DIR := .make
# This controls the verbosity of the build. Higher numbers mean more output.
KUN_VERBOSE ?= 1
define ALL_HELP_INFO
# Build code.
#
# Args:
# WHAT: Directory names to build. If any of these directories has a 'main'
# package, the build will produce executable files under $(OUT_DIR)/go/bin.
# If not specified, "everything" will be built.
# GOFLAGS: Extra flags to pass to 'go' when building.
# GOLDFLAGS: Extra linking flags passed to 'go' when building.
# GOGCFLAGS: Additional go compile flags passed to 'go' when building.
#
# Example:
# make
# make all
# make all WHAT=cmd/funclet GOFLAGS=-v
# make all GOGCFLAGS="-N -l"
# Note: Use the -N -l options to disable compiler optimizations an inlining.
# Using these build options allows you to subsequently use source
# debugging tools like delve.
endef
.PHONY: all
ifeq ($(PRINT_HELP),y)
all:
@echo "$$ALL_HELP_INFO"
else
all: # generated_files
env bash build/make-rules/build.sh $(WHAT)
endif
define CLEAN_HELP_INFO
# Remove all build artifacts.
#
# Example:
# make clean
#
# TODO(thockin): call clean_generated when we stop committing generated code.
endef
.PHONY: clean
ifeq ($(PRINT_HELP),y)
clean:
@echo "$$CLEAN_HELP_INFO"
else
clean: # clean_meta
env bash build/make-clean.sh
rm -rf $(OUT_DIR)
endif
define CHECK_TEST_HELP_INFO
# Build and run tests.
#
# Args:
# WHAT: Directory names to test. All *_test.go files under these
# directories will be run. If not specified, "everything" will be tested.
# TESTS: Same as WHAT.
# KUBE_COVER: Whether to run tests with code coverage. Set to 'y' to enable coverage collection.
# GOFLAGS: Extra flags to pass to 'go' when building.
# GOLDFLAGS: Extra linking flags to pass to 'go' when building.
# GOGCFLAGS: Additional go compile flags passed to 'go' when building.
#
# Example:
# make check
# make test
# make check WHAT=./pkg/kubelet GOFLAGS=-v
endef
.PHONY: check test
ifeq ($(PRINT_HELP),y)
check test:
@echo "$$CHECK_TEST_HELP_INFO"
else
check test: #generated_files
build/make-rules/test.sh $(WHAT) $(TESTS)
endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/baidu/EasyFaaS.git
git@gitee.com:baidu/EasyFaaS.git
baidu
EasyFaaS
EasyFaaS
main

搜索帮助