Ticket #8764: 0002-use-detected-GNU-sed-on-expression-where-Solaris-fai.patch

File 0002-use-detected-GNU-sed-on-expression-where-Solaris-fai.patch, 1.4 KB (added by kgardas, 18 months ago)
  • rules/build-dependencies.mk

    From 29d20a920253772ba773a997cecfd2e7a37aff9a Mon Sep 17 00:00:00 2001
    From: Karel Gardas <[email protected]>
    Date: Sun, 9 Feb 2014 22:05:04 +0100
    Subject: [PATCH 2/2] use detected GNU sed on expression where Solaris' fails.
    
    We set SED make variable to configure detected GNU sed command for quite
    some time now, but surprisingly it is not used in other makefiles. Anyway,
    this patch fixes a real issue on Solaris 10 where distributed Sun/Oracle
    sed is not able to cope with required expression, but GNU sed is.
    The patch is minimal to lower the risk of breakage, but the other approach
    of fixing all occurrences of `sed' to `$(SED)' is of course also possible.
    ---
     rules/build-dependencies.mk | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/rules/build-dependencies.mk b/rules/build-dependencies.mk
    index 79350c0..896efa8 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                                      ; \
     56        $(SED) '/hs$$$$/ p                                      ; \
    5757             /hs$$$$/ s/o /hi /g                             ; \
    5858             /hs$$$$/ s/:/ : %hi: %o /                       ; \
    5959             /hs$$$$/ s/^/$$$$(eval $$$$(call hi-rule,/      ; \