-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch is the basis for libStorage moving forward -- providing a framework more consistent with an evolutionary take on the Docker HTTP platform. Features include: - Contextual logging - Centralized types - Generated server names - Executor generation based on enforced Go interface types - Librarification of the REX-Ray CLI - Using `make run|run-debug|run-tls|run-tls-debug` to start a server directly from source, from the command line.
- Loading branch information
Showing
107 changed files
with
12,395 additions
and
2,805 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
ifneq (1,$(IS_GO_MK_CONFIG_LOADED)) | ||
|
||
# note that the file is loaded | ||
IS_GO_MK_CONFIG_LOADED := 1 | ||
|
||
EMPTY := | ||
SPACE := $(EMPTY) $(EMPTY) | ||
|
||
# set the make flags | ||
RECURSIVE := 0 | ||
ifneq (,$(filter %-all,$(MAKECMDGOALS))) | ||
RECURSIVE := 1 | ||
else | ||
ifneq (,$(word 2,$(filter %_amd64,$(MAKECMDGOALS)))) | ||
RECURSIVE := 1 | ||
else | ||
ifneq (,$(word 2,$(filter %_386,$(MAKECMDGOALS)))) | ||
RECURSIVE := 1 | ||
endif | ||
endif | ||
endif | ||
|
||
MAKEFLAGS := --no-print-directory | ||
ifeq (1,$(RECURSIVE)) | ||
MAKEFLAGS += --output-sync=recurse | ||
endif | ||
|
||
ifeq (,$(CURDIR)) | ||
CURDIR := $(shell pwd) | ||
endif | ||
|
||
# the build platforms for which to perform the cross-* goals | ||
BUILD_PLATFORMS ?= Linux-x86_64 Darwin-x86_64 | ||
|
||
# an ordered, space-delimited list of the go package directories to build and | ||
# install. the root package should be a '.', and all the remaining packages | ||
# should be in the form of './subdir1', './subdir1/subdir1a', './subdir2' | ||
# | ||
# if this variable is empty then it will be populated automatically by using | ||
# the find command to find all directories not beginning with a leading '.' or | ||
# '_' and named 'vendor' or 'doc'. | ||
GO_PKG_DIRS ?= | ||
|
||
# an ordered, space-delimited list of directory patterns that should be ignored. | ||
# for more information on the pattern matching scheme used, search for help on | ||
# the makefile text functions, specifically the filter-out function. | ||
GO_PKG_DIRS_IGNORE_PATTS ?= ./vendor% ./docs% | ||
|
||
# the suffix to append to the related make targets for a package that has the | ||
# same name as its parent package | ||
GO_DUPLICATE_PKG_SUFFIX ?= -cli | ||
|
||
# flags indicating whether or not the following tools are executed against | ||
# the project's source files. valid values are 1 (enabled) and 0 (disabled). | ||
GO_FMT_ENABLED ?= 1 | ||
GO_LINT_ENABLED ?= 1 | ||
GO_CYCLO_ENABLED ?= 1 | ||
GO_VET_ENABLED ?= 1 | ||
|
||
# flags indicating whether or not the following tools are used to package | ||
# artifacts after a successful build. valid values are 1 (enabled) and 0 | ||
# (diabled). | ||
PKG_TGZ_ENABLED ?= 1 | ||
PKG_TGZ_EXTENSION ?= .tar.gz | ||
|
||
# flag indicating whether or not test coverage results are submitted to | ||
# coveralls. valid values are 1 (enabled) and 0 (disabled). please note that | ||
# even if coveralls is enabled, it will be disabled if the build is not | ||
# running on the travis-ci build system. coveralls is also disabled if no | ||
# tests are detected or all tests are excluded | ||
COVERALLS_ENABLED ?= 0 | ||
|
||
# flag indicating whether or not test coverage results are submitted to | ||
# codecov. valid values are 1 (enabled) and 0 (disabled). please note that | ||
# even if codecov is enabled, it will be disabled if the build is not | ||
# running on the travis-ci build system. codecov is also disabled if no | ||
# tests are detected or all tests are excluded | ||
CODECOV_ENABLED ?= 1 | ||
|
||
# a space-delimited list of coverage profile files to exclude when submitting | ||
# results to coverage providers | ||
COVERAGE_EXCLUDE ?= | ||
|
||
# a flag indicating whether or not to use glide for dependency management. | ||
# if a glide.yaml file is detected glide is automatically used unless this | ||
# flag indicates it should be disabled. valid values are 1 (enabled) and 0 | ||
# (disabled) | ||
GLIDE_ENABLED ?= 1 | ||
|
||
# the version of glide to install. glide releases can be found at | ||
# https://github.com/Masterminds/glide/releases. this variable is only used | ||
# if glide is used, which is determined by the presence of the file glide.yaml. | ||
GLIDE_VERSION ?= 0.9.1 | ||
|
||
# the indent to print prior to echoing commands | ||
INDENT_LEN ?= | ||
|
||
# the tags for building go code | ||
ifeq ($(origin GO_TAGS),undefined) | ||
GO_TAGS ?= mock driver | ||
endif | ||
STRIP_GO_TAGS = $(subst $(COMMA)_,$(COMMA)$(SPACE),$(patsubst -tags%,,$(subst -tags$(SPACE),-tags_,$(subst $(COMMA)$(SPACE),$(COMMA)_,$1)))) | ||
|
||
# flags to use with go build | ||
ifeq ($(origin GO_BUILD_FLAGS),undefined) | ||
GO_BUILD_FLAGS ?= | ||
endif | ||
GO_BUILD_FLAGS := $(call STRIP_GO_TAGS,$(GO_BUILD_FLAGS)) | ||
|
||
# flags to use with go install | ||
ifeq ($(origin GO_INSTALL_FLAGS),undefined) | ||
GO_INSTALL_FLAGS ?= | ||
endif | ||
GO_INSTALL_FLAGS := $(call STRIP_GO_TAGS,$(GO_INSTALL_FLAGS)) | ||
|
||
# flags to use with go clean | ||
ifeq ($(origin GO_CLEAN_FLAGS),undefined) | ||
GO_CLEAN_FLAGS ?= -i | ||
endif | ||
|
||
# flags to use when building tests | ||
ifeq ($(origin GO_TEST_BUILD_FLAGS),undefined) | ||
GO_TEST_BUILD_FLAGS ?= | ||
endif | ||
GO_TEST_BUILD_FLAGS := $(call STRIP_GO_TAGS,$(GO_TEST_BUILD_FLAGS)) | ||
|
||
# flags to use when executing tests | ||
ifeq ($(origin GO_TEST_RUN_FLAGS),undefined) | ||
GO_TEST_RUN_FLAGS ?= -test.v | ||
endif | ||
GO_TEST_RUN_FLAGS := $(call STRIP_GO_TAGS,$(GO_TEST_RUN_FLAGS)) | ||
|
||
# a flag indicating whether or not to execute go get during a dependency goal. | ||
# valid values are 1 (enabled) and 0 (disabled) | ||
GO_GET_ENABLED ?= 1 | ||
|
||
endif |
Oops, something went wrong.