Ticket #8764: 0002-fix-sed-expression-in-build-dependencies-rules-to-wo.patch

File 0002-fix-sed-expression-in-build-dependencies-rules-to-wo.patch, 2.2 KB (added by kgardas, 15 months ago)

Christian provided patch in git patch

  • rules/build-dependencies.mk

    From d14d0cdce25eb8909448893ee8bbc0a06b243c00 Mon Sep 17 00:00:00 2001
    From: Karel Gardas <[email protected]>
    Date: Tue, 18 Feb 2014 09:22:59 +0100
    Subject: [PATCH 2/2] fix sed expression in build dependencies rules to work
     well with non-GNU sed (fixes #8764)
    
    The patch is provided by Christian Maeder <[email protected]>
    
    Signed-off-by: Karel Gardas <[email protected]>
    ---
     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 b endif 
    5353#     Foo.dyn_o Foo.o : Foo.hs 
    5454# lines, and create corresponding hi-rule lines 
    5555#     <dollar>(eval <dollar>(call hi-rule,Foo.dyn_hi Foo.hi : %hi: %o Foo.hs)) 
    56         sed '/hs$$$$/ p                                      ; \ 
    57              /hs$$$$/ s/o /hi /g                             ; \ 
    58              /hs$$$$/ s/:/ : %hi: %o /                       ; \ 
    59              /hs$$$$/ s/^/$$$$(eval $$$$(call hi-rule,/      ; \ 
    60              /hs$$$$/ s/$$$$/))/                             ; \ 
    61              /hs-boot$$$$/ p                                 ; \ 
    62              /hs-boot$$$$/ s/o-boot /hi-boot /g              ; \ 
    63              /hs-boot$$$$/ s/:/ : %hi-boot: %o-boot /        ; \ 
    64              /hs-boot$$$$/ s/^/$$$$(eval $$$$(call hi-rule,/ ; \ 
    65              /hs-boot$$$$/ s/$$$$/))/'                         \ 
    66             $$@.tmp2 > $$@ 
    67  
     56        sed -e '/hs$$$$/ p' -e '/hs$$$$/ s/o /hi /g' \ 
     57             -e '/hs$$$$/ s/:/ : %hi: %o /'                       \ 
     58             -e '/hs$$$$/ s/^/$$$$(eval $$$$(call hi-rule,/'      \ 
     59             -e '/hs$$$$/ s/$$$$/))/'                             \ 
     60             -e '/hs-boot$$$$/ p' -e '/hs-boot$$$$/ s/o-boot /hi-boot /g' \ 
     61             -e '/hs-boot$$$$/ s/:/ : %hi-boot: %o-boot /'        \ 
     62             -e '/hs-boot$$$$/ s/^/$$$$(eval $$$$(call hi-rule,/' \ 
     63             -e '/hs-boot$$$$/ s/$$$$/))/'                        \ 
     64             $$@.tmp2 > $$@ 
    6865# Some of the C files (directly or indirectly) include the generated 
    6966# includes files. 
    7067$$($1_$2_depfile_c_asm) : $$(includes_H_CONFIG) $$(includes_H_PLATFORM)