changeset 11885:7ae94af6c620 draft

(svn r16285) -Change: give some warnings when unsupported characters are used in the path
author rubidium <rubidium@openttd.org>
date Tue, 12 May 2009 20:52:12 +0000
parents 017de88ea8de
children d2b0ae6a0c72
files configure
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure
+++ b/configure
@@ -1,5 +1,13 @@
 #!/bin/sh
 
+check_path_characters() {
+	if [ -n "`echo $ROOT_DIR | grep '[^-_A-Za-z0-9\/\\\.:]'`" ]; then
+		echo "WARNING: The path contains a non-alphanumeric character that might cause"
+		echo "         failures in subsequent build stages. Any failures with the build"
+		echo "         will most likely be caused by this."
+	fi
+}
+
 CONFIGURE_EXECUTABLE="$_"
 # On *nix systems those two are equal when ./configure is done
 if [ "$0" != "$CONFIGURE_EXECUTABLE" ]; then
@@ -16,6 +24,8 @@
 ROOT_DIR="`dirname $0`"
 ROOT_DIR="`cd $ROOT_DIR && pwd`"
 
+check_path_characters
+
 PWD="`pwd`"
 PREFIX="$PWD/bin"
 
@@ -135,3 +145,5 @@
 generate_main
 generate_lang
 generate_src
+
+check_path_characters