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

git at git.haskell.org git at git.haskell.org
Thu Feb 20 12:01:13 UTC 2014


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

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/fd5d7277ec3634989872e2a3f30970633936e1a2/ghc

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

commit fd5d7277ec3634989872e2a3f30970633936e1a2
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>
    (cherry picked from commit e638acb6a825559fbd93bdaf8ae2704535c157f1)


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

fd5d7277ec3634989872e2a3f30970633936e1a2
 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