Browse Source

Address minor portability issues (#9414)

* Add os specific sed for FreeBSD.

* Replace hardcoded "make" with $(MAKE)

Some systems don't use GNU make by default, and use something like
gnumake or gmake. Respect that when determining the make version.
tags/v1.11.0-rc1
dankm 4 years ago
parent
commit
d66ae50fd5
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      Makefile

+ 4
- 1
Makefile View File

ifeq ($(UNAME_S),Darwin) ifeq ($(UNAME_S),Darwin)
SED_INPLACE := sed -i '' SED_INPLACE := sed -i ''
endif endif
ifeq ($(UNAME_S),FreeBSD)
SED_INPLACE := sed -i ''
endif
endif endif


GOFILES := $(shell find . -name "*.go" -type f ! -path "./vendor/*" ! -path "*/bindata.go") GOFILES := $(shell find . -name "*.go" -type f ! -path "./vendor/*" ! -path "*/bindata.go")
GOFLAGS := -v GOFLAGS := -v
EXTRA_GOFLAGS ?= EXTRA_GOFLAGS ?=


MAKE_VERSION := $(shell make -v | head -n 1)
MAKE_VERSION := $(shell $(MAKE) -v | head -n 1)


ifneq ($(DRONE_TAG),) ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG)) VERSION ?= $(subst v,,$(DRONE_TAG))

Loading…
Cancel
Save