[commit: ghc] master: Fix build on OS X (8a1b7eb)

Ian Lynagh igloo at earth.li
Tue Apr 30 02:49:30 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/8a1b7eb6add9d873a93f8e12ccf507bfe0d1df7e

>---------------------------------------------------------------

commit 8a1b7eb6add9d873a93f8e12ccf507bfe0d1df7e
Author: Ian Lynagh <ian at well-typed.com>
Date:   Tue Apr 30 00:42:31 2013 +0100

    Fix build on OS X
    
    sed on OS X doesn't handle \+

>---------------------------------------------------------------

 rts/ghc.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/rts/ghc.mk b/rts/ghc.mk
index 166b773..da268df 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -69,11 +69,13 @@ rts_H_FILES += $(DTRACEPROBES_H)
 endif
 
 # collect the -l and -L flags that we need to link the rts dyn lib.
+# Note that, as sed on OS X doesn't handle \+, we use [^ ][^ ]* rather
+# than [^ ]\+
 rts/libs.depend : $$(ghc-pkg_INPLACE)
 	"$(ghc-pkg_INPLACE)" --simple-output field rts extra-libraries \
-	  | sed -e 's/\([^ ]\+\)/-l\1/g' > $@
+	  | sed -e 's/\([^ ][^ ]*\)/-l\1/g' > $@
 	"$(ghc-pkg_INPLACE)" --simple-output field rts library-dirs \
-	  | sed -e 's/\([^ ]\+\)/-L\1/g' >> $@
+	  | sed -e 's/\([^ ][^ ]*\)/-L\1/g' >> $@
 
 
 # ----------------------------------------------------------------------------





More information about the ghc-commits mailing list