Skip to content

Commit d66ae50

Browse files
dankmtechknowlogick
authored andcommitted
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.
1 parent 1b8a919 commit d66ae50

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ else
1616
ifeq ($(UNAME_S),Darwin)
1717
SED_INPLACE := sed -i ''
1818
endif
19+
ifeq ($(UNAME_S),FreeBSD)
20+
SED_INPLACE := sed -i ''
21+
endif
1922
endif
2023

2124
GOFILES := $(shell find . -name "*.go" -type f ! -path "./vendor/*" ! -path "*/bindata.go")
@@ -24,7 +27,7 @@ GOFMT ?= gofmt -s
2427
GOFLAGS := -v
2528
EXTRA_GOFLAGS ?=
2629

27-
MAKE_VERSION := $(shell make -v | head -n 1)
30+
MAKE_VERSION := $(shell $(MAKE) -v | head -n 1)
2831

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

0 commit comments

Comments
 (0)