[commit: ghc] master: fix sed expression in build dependencies rules to work well with non-GNU sed (fixes #8764) (e638acb)

git at git.haskell.org git at git.haskell.org
Wed Feb 19 22:34:42 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e638acb6a825559fbd93bdaf8ae2704535c157f1/ghc

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

commit e638acb6a825559fbd93bdaf8ae2704535c157f1
Author: Karel Gardas <karel.gardas at centrum.cz>
Date:   Tue Feb 18 09:22:59 2014 +0100

    fix sed expression in build dependencies rules to work well with non-GNU sed (fixes #8764)
    
    The patch is provided by Christian Maeder <Christian.Maeder at dfki.de>
    
    Signed-off-by: Karel Gardas <karel.gardas at centrum.cz>
    Signed-off-by: Austin Seipp <austin at well-typed.com>


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

e638acb6a825559fbd93bdaf8ae2704535c157f1
 rules/build-dependencies.mk |   21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/rules/build-dependencies.mk b/rules/build-dependencies.mk
index 79350c0..cdc1edf 100644
--- a/rules/build-dependencies.mk
+++ b/rules/build-dependencies.mk
@@ -53,18 +53,15 @@ endif
 #     Foo.dyn_o Foo.o : Foo.hs
 # lines, and create corresponding hi-rule lines
 #     <dollar>(eval <dollar>(call hi-rule,Foo.dyn_hi Foo.hi : %hi: %o Foo.hs))
-	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 > $$@
-
+	sed -e '/hs$$$$/ p' -e '/hs$$$$/ s/o /hi /g' \
+             -e '/hs$$$$/ s/:/ : %hi: %o /'                       \
+             -e '/hs$$$$/ s/^/$$$$(eval $$$$(call hi-rule,/'      \
+             -e '/hs$$$$/ s/$$$$/))/'                             \
+             -e '/hs-boot$$$$/ p' -e '/hs-boot$$$$/ s/o-boot /hi-boot /g' \
+             -e '/hs-boot$$$$/ s/:/ : %hi-boot: %o-boot /'        \
+             -e '/hs-boot$$$$/ s/^/$$$$(eval $$$$(call hi-rule,/' \
+             -e '/hs-boot$$$$/ s/$$$$/))/'                        \
+             $$@.tmp2 > $$@
 # Some of the C files (directly or indirectly) include the generated
 # includes files.
 $$($1_$2_depfile_c_asm) : $$(includes_H_CONFIG) $$(includes_H_PLATFORM)



More information about the ghc-commits mailing list