[commit: ghc] master: Tweak the sed command so that it works on OSX (02a489e)

Ian Lynagh igloo at earth.li
Sat Feb 23 16:18:38 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/02a489edcf82e6c38d6ee67faa337fdd314f9c0c

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

commit 02a489edcf82e6c38d6ee67faa337fdd314f9c0c
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sat Feb 23 02:33:20 2013 +0000

    Tweak the sed command so that it works on OSX
    
    Using { } with sed on OS X requires using newlines rather than
    semicolons. I've rewritten the sed so that no { } are necessary.

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

 rules/build-dependencies.mk |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/rules/build-dependencies.mk b/rules/build-dependencies.mk
index 346ee10..7b66dcd 100644
--- a/rules/build-dependencies.mk
+++ b/rules/build-dependencies.mk
@@ -49,7 +49,17 @@ endif
 #    within the build tree. On Windows this causes a problem as they look
 #    like bad rules, due to the two colons, so we filter them out.
 	grep -v ' : [a-zA-Z]:/' $$@.tmp > $$@.tmp2
-	sed '/hs$$$$/ { p; s/o /hi /g; s/:/ : %hi: %o /; s/^/$$$$(eval $$$$(call hi-rule,/; s/$$$$/))/ }; /hs-boot$$$$/ { p; s/o-boot /hi-boot /g; s/:/ : %hi-boot: %o-boot /; s/^/$$$$(eval $$$$(call hi-rule,/; s/$$$$/))/ }' $$@.tmp2 > $$@
+	sed '/hs$$$$/ p                                      ; \
+	     /hs$$$$/ s/o /hi /g                             ; \
+	     /hs$$$$/ s/:/ : %hi: %o /                       ; \
+	     /hs$$$$/ s/^/$$$$(eval $$$$(call hi-rule,/      ; \
+	     /hs$$$$/ s/$$$$/))/                             ; \
+	     /hs-boot$$$$/ p                                 ; \
+	     /hs-boot$$$$/ s/o-boot /hi-boot /g              ; \
+	     /hs-boot$$$$/ s/:/ : %hi-boot: %o-boot /        ; \
+	     /hs-boot$$$$/ s/^/$$$$(eval $$$$(call hi-rule,/ ; \
+	     /hs-boot$$$$/ s/$$$$/))/'                         \
+	    $$@.tmp2 > $$@
 
 # Some of the C files (directly or indirectly) include the generated
 # includes files.





More information about the ghc-commits mailing list