Makefile: fix sed on OSX
authorJosh de Kock <josh@itanimul.li>
Fri, 1 Jul 2016 23:08:12 +0000 (00:08 +0100)
committerGitHub <noreply@github.com>
Fri, 1 Jul 2016 23:08:12 +0000 (00:08 +0100)
sed on OSX doesn't have -r so default to the usage of GNU sed

src/Makefile

index 6b0a413..4fdcb5b 100644 (file)
@@ -63,6 +63,9 @@ FIND                     := find
 INSTALL                  := install
 RM                       := rm
 SED                      := sed
+ifeq ($(UNAME),Darwin)
+SED                      := gsed
+endif
 
 ##
 ## Cross compiler paths
@@ -81,7 +84,7 @@ CC_WIN_64                := x86_64-w64-mingw32-gcc
 COMPTIME                 := $(shell date +%s)
 
 VERSION_EXPORT           := $Format:%D$
-VERSION_TAG              := $(shell test -d .git && git describe --tags --dirty=+ || echo "$(VERSION_EXPORT)"|cut -d, -f2|sed -r 's|.* (\w+/)?([^ ]+)|\2|')
+VERSION_TAG              := $(shell test -d .git && git describe --tags --dirty=+ || echo "$(VERSION_EXPORT)"|cut -d, -f2|$(SED) -r 's|.* (\w+/)?([^ ]+)|\2|')
 
 ##
 ## Compiler flags