View | Details | Raw Unified | Return to bug 177018 | Differences between
and this patch

Collapse All | Expand All

(-)build-0.3/c/gnu/dep (-11 / +10 lines)
Lines 1-3 Link Here
1
#! /usr/bin/env bash
1
#!/bin/sh -x
2
2
3
# file      : build/c/gnu/dep
3
# file      : build/c/gnu/dep
Lines 21-25 Link Here
21
script=
21
script=
22
22
23
function gen_script ()
23
gen_script ()
24
{
24
{
25
  while [ "$1" ]; do
25
  while [ "$1" ]; do
Lines 34-43 Link Here
34
    #
34
    #
35
    script="$script"\
35
    script="$script"\
36
"s \\ $prefix \\ $path$prefix g;"\
36
" -e 's| $prefix| $path$prefix|g'"\
37
"s \\ /usr/include/$prefix \\ $path$prefix g;"\
37
" -e 's| /usr/include/$prefix| $path$prefix|g'"\
38
"s \\ /usr/local/include/$prefix \\ $path$prefix g;"\
38
" -e 's| /usr/local/include/$prefix| $path$prefix|g'"\
39
"s ^$prefix $path$prefix ;"\
39
" -e 's|^$prefix|$path$prefix|'"\
40
"s ^/usr/include/$prefix $path$prefix ;"\
40
" -e 's|^/usr/include/$prefix|$path$prefix|'"\
41
"s ^/usr/local/include/$prefix $path$prefix ;"
41
" -e 's|^/usr/local/include/$prefix|$path$prefix|'"
42
  done
42
  done
43
}
43
}
Lines 54-58 Link Here
54
# some other place (e.g., /usr/include).
54
# some other place (e.g., /usr/include).
55
#
55
#
56
epilogue="s% \([^/. \\\\]\)% $out_base/\1%g;s%^\([^/. ].*:\)%$out_base/\1%"
56
script="${script} -e 's% \([^/. \\\\]\)% $out_base/\1%g;s%^\([^/. ].*:\)%$out_base/\1%'"
57
57
eval exec sed $script
58
exec sed -e "$script$epilogue"

Return to bug 177018