https://github.com/cilium/cilium
Raw File
Tip revision: 82cc56046e2dbc0673e2e8f0b28c64aa12803e1e authored by Ian Vernon on 11 July 2019, 20:10:07 UTC
Prepare for v1.3.8
Tip revision: 82cc560
Makefile.defs
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
RELATIVE_DIR := $(shell echo $(realpath .) | sed "s;$(ROOT_DIR)[/]*;;")
include $(ROOT_DIR)/Makefile.quiet

PREFIX?=/usr
BINDIR?=$(PREFIX)/bin
LIBDIR?=$(PREFIX)/lib
RUNDIR?=/var/run
CONFDIR?=/etc

# GO_NOQUIET should not have any Makefile directives.
GO_NOQUIET = go
GO = $(QUIET)$(GO_NOQUIET)
INSTALL = $(QUIET)install

VERSION = $(shell cat $(dir $(lastword $(MAKEFILE_LIST)))/VERSION)
# Use git only if in a Git repo
ifneq ($(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/.git),)
	GIT_VERSION = $(shell git show -s --format='format:%h %aI')
else
	GIT_VERSION = $(shell cat $(ROOT_DIR)/GIT_VERSION)
endif
BUILD = $(VERSION) $(GIT_VERSION) $(shell go version)
CILIUM_ENVOY_SHA=$(shell grep -o "FROM.*cilium/cilium-envoy:[0-9a-fA-F]*" $(ROOT_DIR)/Dockerfile | cut -d : -f 2)
GOBUILD = -ldflags '-X "github.com/cilium/cilium/pkg/version.Version=$(BUILD)" -X "github.com/cilium/cilium/pkg/envoy.RequiredEnvoyVersionSHA=$(CILIUM_ENVOY_SHA)"'

# Uncomment to enable race detection
#GOBUILD += -race

# Uncomment to enable deadlock detection
#GOBUILD += -tags lockdebug

ifneq ($(LOCKDEBUG),)
    GOBUILD += -tags lockdebug
endif

# Set DOCKER_IMAGE_TAG with "latest" by default
ifeq ($(DOCKER_IMAGE_TAG),)
    DOCKER_IMAGE_TAG="latest"
endif
back to top