summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2008-03-31 20:30:48 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2008-03-31 20:30:48 +0000
commitab25678e9166611a11acee2612b856ec733d2da4 (patch)
tree5ef343076b4d7739dc921b29ac551b0c07a6e9ef /bin
parent0137db6d752e8ad23413876353eefa83b456afbf (diff)
downloadptxdist-ab25678e9166611a11acee2612b856ec733d2da4.tar.gz
ptxdist-ab25678e9166611a11acee2612b856ec733d2da4.tar.xz
* ptxdist: fix toolchain handling
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7899 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ptxdist26
1 files changed, 18 insertions, 8 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index c06917610..3b57ac391 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -238,23 +238,33 @@ check_compiler() {
if [ ! -z "$vendor_should" ]; then
- # yea! Vendor is specified in the project. So check for
- # toolchain vendor identification file
+ # yea! A toolchain vendor was specified in the ptxconfig file.
+ # So we check for a 'ptxconfig' file in the toolchain directory
+ # and test the PTXCONF_PROJECT string therein.
- vendor_def=$(type -p ptxconfig)
+ if [ ! -d ${PTXDIST_WORKSPACE}/.toolchain ]; then
+ echo
+ echo "${PROMPT}error: specify .toolchain with 'ptxdist toolchain <path>'"
+ echo "${PROMPT}error: or leave PTXCONF_CROSSCHAIN_VENDOR empty to disable toolchain check"
+ echo
+ exit 1
+ fi
+
+ vendor_def=$(readlink -f ${PTXDIST_WORKSPACE}/.toolchain/ptxconfig)
if [ -z "$vendor_def" ]; then
echo
- echo "${PROMPT}error: Cannot check toolchain vendor. If this is all right,"
- echo "${PROMPT}error: leave 'check for specific toolchain vendor' empty!"
+ echo "${PROMPT}error: .toolchain doesn't point to an OSELAS.Toolchain"
+ echo "${PROMPT}error: set PTXCONF_CROSSCHAIN_VENDOR to disable toolchain version check"
echo
exit 1
else
- # both vendor strings are present. Check them
+ # both vendor strings are present. Check them
vendor_is=$(. $vendor_def && echo ${PTXCONF_PROJECT})
if [ "$vendor_is" != "$vendor_should" ]; then
echo
- echo "${PROMPT}error: Wrong toolchain vendor. Cannot continue! Vendor is <$vendor_is>,"
- echo "${PROMPT}error: but should be <$vendor_should> to build this project!"
+ echo "${PROMPT}error: wrong toolchain vendor: Cannot continue! Vendor is <$vendor_is>,"
+ echo "${PROMPT}error: specified: $vendor_should"
+ echo "${PROMPT}error: found: $vendor_is"
echo
exit 1
fi