scripts: create the makeinfo wrapper before we set PATH
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jan 22 23:20:18 2011 +0100 (2011-01-22)
changeset 23052ed26c646568
parent 2304 ee3185cdaf1b
child 2306 0a9e8cb7ccf4
scripts: create the makeinfo wrapper before we set PATH

If we set PATH to the tools wrappers before we create the
makeinfo wrapper, then we may well wrap an existing wrapper
from a previous run.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/crosstool-NG.sh.in
     1.1 --- a/scripts/crosstool-NG.sh.in	Sat Jan 22 22:52:57 2011 +0100
     1.2 +++ b/scripts/crosstool-NG.sh.in	Sat Jan 22 23:20:18 2011 +0100
     1.3 @@ -472,6 +472,13 @@
     1.4          done
     1.5      done
     1.6  
     1.7 +    # Some makeinfo versions are a pain in [put your most sensible body part here].
     1.8 +    # Go ahead with those, by creating a wrapper that keeps partial files, and that
     1.9 +    # never fails:
    1.10 +    CT_DoLog DEBUG "  'makeinfo' -> '$(CT_Which makeinfo)'"
    1.11 +    printf "#${BANG}${CT_SHELL}\n$(CT_Which makeinfo) --force \"\${@}\"\ntrue\n" >"${CT_PREFIX_DIR}/buildtools/makeinfo"
    1.12 +    CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/buildtools/makeinfo"
    1.13 +
    1.14      # Carefully add paths in the order we want them:
    1.15      #  - first try in ${CT_PREFIX_DIR}/bin
    1.16      #  - then try in ${CT_CC_CORE_SHARED_PREFIX_DIR}/bin
    1.17 @@ -485,13 +492,6 @@
    1.18          *)  ;;
    1.19      esac
    1.20  
    1.21 -    # Some makeinfo versions are a pain in [put your most sensible body part here].
    1.22 -    # Go ahead with those, by creating a wrapper that keeps partial files, and that
    1.23 -    # never fails:
    1.24 -    CT_DoLog DEBUG "  'makeinfo' -> '$(CT_Which makeinfo)'"
    1.25 -    printf "#${BANG}${CT_SHELL}\n$(CT_Which makeinfo) --force \"\${@}\"\ntrue\n" >"${CT_PREFIX_DIR}/buildtools/makeinfo"
    1.26 -    CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/buildtools/makeinfo"
    1.27 -
    1.28      # Help gcc
    1.29      CT_CFLAGS_FOR_HOST=
    1.30      [ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST="${CT_CFLAGS_FOR_HOST} -pipe"