scripts: check for, and warn about an unset CT_PREFIX_DIR 1.5
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Dec 19 12:44:21 2009 +0100 (2009-12-19)
branch1.5
changeset 17065360c810222d
parent 1666 bf0dca8650a4
child 1707 b522b439a1e4
scripts: check for, and warn about an unset CT_PREFIX_DIR

The user shall provide a directory to install the toolchain into.
If he/she does not, this is an error, and shall be detected properly,
rather than relying on failure down the road.

Thanks to "Pedro I. Sanchez" <psanchez@colcan.ca> for pointing out
the issue:
http://sourceware.org/ml/crossgcc/2009-12/msg00011.html
(transplanted from e94f4ffddd1d07b3841160db71694cd19fda6b03)
scripts/crosstool-NG.sh.in
     1.1 --- a/scripts/crosstool-NG.sh.in	Sat Dec 19 13:08:34 2009 +0100
     1.2 +++ b/scripts/crosstool-NG.sh.in	Sat Dec 19 12:44:21 2009 +0100
     1.3 @@ -134,6 +134,9 @@
     1.4  # then rescan the options file now:
     1.5  . .config
     1.6  
     1.7 +# Sanity check some directories
     1.8 +CT_TestAndAbort "'CT_PREFIX_DIR' is not set: where should I install?" -z "${CT_PREFIX_DIR}"
     1.9 +
    1.10  # Second kludge: merge user-supplied target CFLAGS with architecture-provided
    1.11  # target CFLAGS. Do the same for LDFLAGS in case it happens in the future.
    1.12  # Put user-supplied flags at the end, so that they take precedence.