fix sed expression in build dependencies rules to work well with non-GNU sed (fixes...
authorKarel Gardas <karel.gardas@centrum.cz>
Tue, 18 Feb 2014 08:22:59 +0000 (09:22 +0100)
committerAustin Seipp <austin@well-typed.com>
Wed, 19 Feb 2014 22:32:36 +0000 (16:32 -0600)
The patch is provided by Christian Maeder <Christian.Maeder@dfki.de>

Signed-off-by: Karel Gardas <karel.gardas@centrum.cz>
Signed-off-by: Austin Seipp <austin@well-typed.com>
rules/build-dependencies.mk

index 79350c0..cdc1edf 100644 (file)
@@ -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)