Enable use of homebrew's provided bison if available
authorFabio Utzig <utzig@utzig.org>
Thu, 8 Jan 2015 11:58:24 +0000 (09:58 -0200)
committerFabio Utzig <utzig@utzig.org>
Thu, 8 Jan 2015 11:58:24 +0000 (09:58 -0200)
Makefile

index 0ac0b7efdde15af8a3dc8808230b58622abf1d3f..a3aa2a397ba35833eee7f39dcd6d3808d57a47a1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -44,6 +44,8 @@ ifeq (Darwin,$(findstring Darwin,$(shell uname)))
        # add homebrew's libffi include and library path
        CXXFLAGS += $(shell PKG_CONFIG_PATH=$$(brew list libffi | grep pkgconfig | xargs dirname) pkg-config --silence-errors --cflags libffi)
        LDFLAGS += $(shell PKG_CONFIG_PATH=$$(brew list libffi | grep pkgconfig | xargs dirname) pkg-config --silence-errors --libs libffi)
+       # use bison installed by homebrew if available
+       BISON = $(shell (brew list bison | grep -m1 "bin/bison") || echo bison)
        SED = gsed
 else
        LDFLAGS += -rdynamic