diff options
author | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-06-06 21:57:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-06 21:57:13 +0000 |
commit | 02b7c0714e7481be09a520993e3fdc8faad991b3 (patch) | |
tree | 0d9b8040536039b0ab7808523c3fa3f89fe54d0e /Makefile | |
parent | 7cfed3f075a8061270fb72fcf1ed3c7c46803761 (diff) | |
parent | 63909e9da7ef62b3c6b6e258e93c5d64d32bdead (diff) |
Merge pull request #273 from sifive/sed_re_flag
Allow sed to work on MacOS
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -20,6 +20,19 @@ endif PROGRAM ?= hello TARGET ?= sifive-hifive1 +# Setup differences between host platforms +ifeq ($(OS),Windows_NT) + SED_RE_FLAG = -r +else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Linux) + SED_RE_FLAG = -r + endif + ifeq ($(UNAME_S),Darwin) + SED_RE_FLAG = -E + endif +endif + # Coremark require PORT_DIR set for different OS, freedom-metal for us! ifeq ($(PROGRAM),coremark) ifeq ($(PORT_DIR),) @@ -145,7 +158,7 @@ list-targets: list-target-tags: @echo target-tags: $(shell find $(TARGET_ROOT)/bsp -name settings.mk | \ xargs grep -he "TARGET_TAGS" | \ - sed -r 's/TARGET_TAGS.*=(.*)/\1/' | \ + sed $(SED_RE_FLAG) 's/TARGET_TAGS.*=(.*)/\1/' | \ tr ' ' '\n' | \ sort | \ uniq) |