mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Attempt to prevent con figuration with bad paths on windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@23138 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3888e4b22f
commit
c251133e07
6 changed files with 3280 additions and 2334 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2006-07-06 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
* configure.ac: Prevent bad characters in paths
|
||||
* configure: regenerate
|
||||
* GNUstep.csh.in: remove use of obsolete substitutions
|
||||
* GNUstep.sh.in: ditto
|
||||
* GNUstep.conf.in: ditto
|
||||
The use of backslash or space characters in a path/filename can
|
||||
confuse make and shell scripts, so we check for them and prevent
|
||||
them from being specified at configure time and/or built in to
|
||||
scripts. Hopefully this will prevent much confusion on windows.
|
||||
|
||||
2006-07-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* GNUmakefile.in: install config.make in library combo specific
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
## not be used while building.
|
||||
##
|
||||
|
||||
GNUSTEP_SYSTEM_ROOT=@GNUSTEP_SHELL_SYSTEM_ROOT@
|
||||
GNUSTEP_LOCAL_ROOT=@GNUSTEP_SHELL_LOCAL_ROOT@
|
||||
GNUSTEP_NETWORK_ROOT=@GNUSTEP_SHELL_NETWORK_ROOT@
|
||||
GNUSTEP_SYSTEM_ROOT=@GNUSTEP_SYSTEM_ROOT@
|
||||
GNUSTEP_LOCAL_ROOT=@GNUSTEP_LOCAL_ROOT@
|
||||
GNUSTEP_NETWORK_ROOT=@GNUSTEP_NETWORK_ROOT@
|
||||
|
||||
GNUSTEP_USER_CONFIG_FILE=@GNUSTEP_SHELL_USER_CONFIG_FILE@
|
||||
GNUSTEP_USER_DIR=@GNUSTEP_SHELL_USER_DIR@
|
||||
GNUSTEP_USER_DEFAULTS_DIR=@GNUSTEP_SHELL_USER_DEFAULTS_DIR@
|
||||
GNUSTEP_USER_CONFIG_FILE=@GNUSTEP_USER_CONFIG_FILE@
|
||||
GNUSTEP_USER_DIR=@GNUSTEP_USER_DIR@
|
||||
GNUSTEP_USER_DEFAULTS_DIR=@GNUSTEP_USER_DEFAULTS_DIR@
|
||||
|
|
|
@ -34,12 +34,12 @@
|
|||
|
||||
# Determine the location of the system configuration file
|
||||
if ( ! ${?GNUSTEP_CONFIG_FILE} ) then
|
||||
setenv GNUSTEP_CONFIG_FILE "@GNUSTEP_SHELL_CONFIG_FILE@"
|
||||
setenv GNUSTEP_CONFIG_FILE "@GNUSTEP_CONFIG_FILE@"
|
||||
endif
|
||||
|
||||
# Determine the location of the user configuration file
|
||||
if ( ! ${?GNUSTEP_USER_CONFIG_FILE} ) then
|
||||
setenv GNUSTEP_USER_CONFIG_FILE "@GNUSTEP_SHELL_USER_CONFIG_FILE@"
|
||||
setenv GNUSTEP_USER_CONFIG_FILE "@GNUSTEP_USER_CONFIG_FILE@"
|
||||
endif
|
||||
|
||||
# Read the system configuration file
|
||||
|
@ -95,15 +95,15 @@ endif
|
|||
# Now, set any essential variable (that is not already set) to the
|
||||
# built-in values.
|
||||
if ( ! ${?GNUSTEP_SYSTEM_ROOT} ) then
|
||||
setenv GNUSTEP_SYSTEM_ROOT "@GNUSTEP_SHELL_SYSTEM_ROOT@"
|
||||
setenv GNUSTEP_SYSTEM_ROOT "@GNUSTEP_SYSTEM_ROOT@"
|
||||
endif
|
||||
|
||||
if ( ! ${?GNUSTEP_LOCAL_ROOT} ) then
|
||||
setenv GNUSTEP_LOCAL_ROOT "@GNUSTEP_SHELL_LOCAL_ROOT@"
|
||||
setenv GNUSTEP_LOCAL_ROOT "@GNUSTEP_LOCAL_ROOT@"
|
||||
endif
|
||||
|
||||
if ( ! ${?GNUSTEP_NETWORK_ROOT} ) then
|
||||
setenv GNUSTEP_NETWORK_ROOT "@GNUSTEP_SHELL_NETWORK_ROOT@"
|
||||
setenv GNUSTEP_NETWORK_ROOT "@GNUSTEP_NETWORK_ROOT@"
|
||||
endif
|
||||
|
||||
|
||||
|
@ -117,7 +117,7 @@ if ( ! ${?GNUSTEP_MAKEFILES} ) then
|
|||
endif
|
||||
|
||||
if ( ! ${?GNUSTEP_USER_DIR} ) then
|
||||
setenv GNUSTEP_USER_DIR "@GNUSTEP_SHELL_USER_DIR@"
|
||||
setenv GNUSTEP_USER_DIR "@GNUSTEP_USER_DIR@"
|
||||
endif
|
||||
|
||||
#
|
||||
|
|
|
@ -78,12 +78,12 @@ fi
|
|||
|
||||
# Determine the location of the system configuration file
|
||||
if [ -z "$GNUSTEP_CONFIG_FILE" ]; then
|
||||
GNUSTEP_CONFIG_FILE=@GNUSTEP_SHELL_CONFIG_FILE@
|
||||
GNUSTEP_CONFIG_FILE=@GNUSTEP_CONFIG_FILE@
|
||||
fi
|
||||
|
||||
# Determine the location of the user configuration file
|
||||
if [ -z "$GNUSTEP_USER_CONFIG_FILE" ]; then
|
||||
GNUSTEP_USER_CONFIG_FILE=@GNUSTEP_SHELL_USER_CONFIG_FILE@
|
||||
GNUSTEP_USER_CONFIG_FILE=@GNUSTEP_USER_CONFIG_FILE@
|
||||
fi
|
||||
|
||||
# Read the system configuration file
|
||||
|
@ -112,15 +112,15 @@ fi
|
|||
# Now, set any essential variable (that is not already set) to the
|
||||
# built-in values.
|
||||
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
|
||||
GNUSTEP_SYSTEM_ROOT=@GNUSTEP_SHELL_SYSTEM_ROOT@
|
||||
GNUSTEP_SYSTEM_ROOT=@GNUSTEP_SYSTEM_ROOT@
|
||||
fi
|
||||
|
||||
if [ -z "$GNUSTEP_LOCAL_ROOT" ]; then
|
||||
GNUSTEP_LOCAL_ROOT=@GNUSTEP_SHELL_LOCAL_ROOT@
|
||||
GNUSTEP_LOCAL_ROOT=@GNUSTEP_LOCAL_ROOT@
|
||||
fi
|
||||
|
||||
if [ -z "$GNUSTEP_NETWORK_ROOT" ]; then
|
||||
GNUSTEP_NETWORK_ROOT=@GNUSTEP_SHELL_NETWORK_ROOT@
|
||||
GNUSTEP_NETWORK_ROOT=@GNUSTEP_NETWORK_ROOT@
|
||||
fi
|
||||
|
||||
export GNUSTEP_SYSTEM_ROOT GNUSTEP_LOCAL_ROOT GNUSTEP_NETWORK_ROOT
|
||||
|
@ -137,7 +137,7 @@ fi
|
|||
export GNUSTEP_MAKEFILES
|
||||
|
||||
if [ -z "$GNUSTEP_USER_DIR" ]; then
|
||||
GNUSTEP_USER_DIR=@GNUSTEP_SHELL_USER_DIR@
|
||||
GNUSTEP_USER_DIR=@GNUSTEP_USER_DIR@
|
||||
fi
|
||||
|
||||
#
|
||||
|
|
122
configure.ac
122
configure.ac
|
@ -115,10 +115,18 @@ esac
|
|||
# Determine the host, build, and target systems
|
||||
#--------------------------------------------------------------------
|
||||
case $host_os in
|
||||
*cygwin* ) CYGWIN=yes;;
|
||||
*mingw32* ) MINGW32=yes;;
|
||||
* ) MINGW32=no
|
||||
CYGWIN=no;;
|
||||
*cygwin* )
|
||||
MINGW32=no
|
||||
CYGWIN=yes
|
||||
MSWIND=yes;;
|
||||
*mingw32* )
|
||||
MINGW32=yes
|
||||
CYGWIN=yes
|
||||
MSWIND=yes;;
|
||||
* )
|
||||
MINGW32=no
|
||||
CYGWIN=no
|
||||
MSWIND=no;;
|
||||
esac
|
||||
AC_SUBST(CYGWIN)
|
||||
|
||||
|
@ -201,6 +209,18 @@ if test "$GNUSTEP_CONFIG_FILE" = "" -o "$GNUSTEP_CONFIG_FILE" = "no"; then
|
|||
*) GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf ;;
|
||||
esac
|
||||
fi
|
||||
if echo "$GNUSTEP_CONFIG_FILE" | grep -q '[ \t\\]'
|
||||
then
|
||||
echo "found a backslash or space (illegal) in '$GNUSTEP_CONFIG_FILE'"
|
||||
echo "Please try again using --with-config-file= to specify a valid path."
|
||||
if test "$MSWIND" = "yes"
|
||||
then
|
||||
echo "Please note that on windows you must use unix-style paths within"
|
||||
echo "the make package even though gnustep programs built in the mingw32"
|
||||
echo "environment use native paths throughout."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
AC_MSG_RESULT($GNUSTEP_CONFIG_FILE)
|
||||
AC_SUBST(GNUSTEP_CONFIG_FILE)
|
||||
|
||||
|
@ -325,6 +345,18 @@ GNUSTEP_SYSTEM_ROOT="$withval",)
|
|||
if test "$GNUSTEP_SYSTEM_ROOT" = "" -o "$GNUSTEP_SYSTEM_ROOT" = "no"; then
|
||||
GNUSTEP_SYSTEM_ROOT="$GNUSTEP_ROOT/System"
|
||||
fi
|
||||
if echo "$GNUSTEP_SYSTEM_ROOT" | grep -q '[ \t\\]'
|
||||
then
|
||||
echo "found a backslash or space (illegal) in '$GNUSTEP_SYSTEM_ROOT'"
|
||||
echo "Please try again using --with-system-root= to specify a valid path."
|
||||
if test "$MSWIND" = "yes"
|
||||
then
|
||||
echo "Please note that on windows you must use unix-style paths within"
|
||||
echo "the make package even though gnustep programs built in the mingw32"
|
||||
echo "environment use native paths throughout."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
AC_MSG_RESULT($GNUSTEP_SYSTEM_ROOT)
|
||||
AC_SUBST(GNUSTEP_SYSTEM_ROOT)
|
||||
|
||||
|
@ -342,6 +374,18 @@ GNUSTEP_LOCAL_ROOT="$withval",)
|
|||
if test "$GNUSTEP_LOCAL_ROOT" = "" -o "$GNUSTEP_LOCAL_ROOT" = "no"; then
|
||||
GNUSTEP_LOCAL_ROOT="$GNUSTEP_ROOT/Local"
|
||||
fi
|
||||
if echo "$GNUSTEP_LOCAL_ROOT" | grep -q '[ \t\\]'
|
||||
then
|
||||
echo "found a backslash or space (illegal) in '$GNUSTEP_LOCAL_ROOT'"
|
||||
echo "Please try again using --with-local-root= to specify a valid path."
|
||||
if test "$MSWIND" = "yes"
|
||||
then
|
||||
echo "Please note that on windows you must use unix-style paths within"
|
||||
echo "the make package even though gnustep programs built in the mingw32"
|
||||
echo "environment use native paths throughout."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
AC_MSG_RESULT($GNUSTEP_LOCAL_ROOT)
|
||||
AC_SUBST(GNUSTEP_LOCAL_ROOT)
|
||||
|
||||
|
@ -366,6 +410,18 @@ GNUSTEP_NETWORK_ROOT="$withval",)
|
|||
if test "$GNUSTEP_NETWORK_ROOT" = "" -o "$GNUSTEP_NETWORK_ROOT" = "no"; then
|
||||
GNUSTEP_NETWORK_ROOT="$GNUSTEP_LOCAL_ROOT"
|
||||
fi
|
||||
if echo "$GNUSTEP_NETWORK_ROOT" | grep -q '[ \t\\]'
|
||||
then
|
||||
echo "found a backslash or space (illegal) in '$GNUSTEP_NETWORK_ROOT'"
|
||||
echo "Please try again using --with-network-root= to specify a valid path."
|
||||
if test "$MSWIND" = "yes"
|
||||
then
|
||||
echo "Please note that on windows you must use unix-style paths within"
|
||||
echo "the make package even though gnustep programs built in the mingw32"
|
||||
echo "environment use native paths throughout."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
AC_MSG_RESULT($GNUSTEP_NETWORK_ROOT)
|
||||
AC_SUBST(GNUSTEP_NETWORK_ROOT)
|
||||
|
||||
|
@ -386,6 +442,19 @@ GNUSTEP_USER_CONFIG_FILE="$withval",)
|
|||
if test "$GNUSTEP_USER_CONFIG_FILE" = "" -o "$GNUSTEP_USER_CONFIG_FILE" = "no"; then
|
||||
GNUSTEP_USER_CONFIG_FILE=".GNUstep.conf"
|
||||
fi
|
||||
if echo "$GNUSTEP_USER_CONFIG_FILE" | grep -q '[ \t\\]'
|
||||
then
|
||||
echo "found a backslash or space (illegal) in '$GNUSTEP_USER_CONFIG_FILE'"
|
||||
echo "Please try again using --with-user-config-file= to specify a value."
|
||||
if test "$MSWIND" = "yes"
|
||||
then
|
||||
echo "Please note that on windows you must use unix-style paths within"
|
||||
echo "the make package even though gnustep programs built in the mingw32"
|
||||
echo "environment use native paths throughout."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
AC_MSG_RESULT($GNUSTEP_NETWORK_ROOT)
|
||||
AC_MSG_RESULT($GNUSTEP_USER_CONFIG_FILE)
|
||||
AC_SUBST(GNUSTEP_USER_CONFIG_FILE)
|
||||
|
||||
|
@ -407,6 +476,18 @@ GNUSTEP_USER_DIR="$withval",)
|
|||
if test "$GNUSTEP_USER_DIR" = "" -o "$GNUSTEP_USER_DIR" = "no"; then
|
||||
GNUSTEP_USER_DIR="GNUstep"
|
||||
fi
|
||||
if echo "$GNUSTEP_USER_DIR" | grep -q '[ \t\\]'
|
||||
then
|
||||
echo "found a backslash or space (illegal) in '$GNUSTEP_USER_DIR'"
|
||||
echo "Please try again using --with-user-dir= to specify a value."
|
||||
if test "$MSWIND" = "yes"
|
||||
then
|
||||
echo "Please note that on windows you must use unix-style paths within"
|
||||
echo "the make package even though gnustep programs built in the mingw32"
|
||||
echo "environment use native paths throughout."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
AC_MSG_RESULT($GNUSTEP_USER_DIR)
|
||||
AC_SUBST(GNUSTEP_USER_DIR)
|
||||
|
||||
|
@ -422,12 +503,24 @@ AC_ARG_WITH(user-defaults-dir,[
|
|||
absolute path. Use this option if you want to have the
|
||||
GNUSTEP_USER_DEFAULTS_DIR directory in a non default place for
|
||||
all users. The default is 'GNUstep/Defaults'
|
||||
Example: --with-user-root='GNUstep/Library/Defaults'
|
||||
Example: --with-user-defaults-dir='GNUstep/Library/Defaults'
|
||||
],
|
||||
GNUSTEP_USER_DEFAULTS_DIR="$withval",)
|
||||
if test "$GNUSTEP_USER_DEFAULTS_DIR" = "" -o "$GNUSTEP_USER_DEFAULTS_DIR" = "no"; then
|
||||
GNUSTEP_USER_DEFAULTS_DIR="GNUstep/Defaults"
|
||||
fi
|
||||
if echo "$GNUSTEP_USER_DEFAULTS_DIR" | grep -q '[ \t\\]'
|
||||
then
|
||||
echo "found a backslash or space (illegal) in '$GNUSTEP_USER_DEFAULTS_DIR'"
|
||||
echo "Please try again using --with-user-defaults-dir= to specify a value."
|
||||
if test "$MSWIND" = "yes"
|
||||
then
|
||||
echo "Please note that on windows you must use unix-style paths within"
|
||||
echo "the make package even though gnustep programs built in the mingw32"
|
||||
echo "environment use native paths throughout."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
AC_MSG_RESULT($GNUSTEP_USER_DEFAULTS_DIR)
|
||||
AC_SUBST(GNUSTEP_USER_DEFAULTS_DIR)
|
||||
|
||||
|
@ -895,25 +988,6 @@ AC_SUBST(clean_target_cpu)
|
|||
AC_SUBST(clean_target_vendor)
|
||||
AC_SUBST(target)
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# Record paths for use in shell scripts ... with backslashes quoted.
|
||||
#-------------------------------------------------------------------
|
||||
GNUSTEP_SHELL_SYSTEM_ROOT=`echo $GNUSTEP_SYSTEM_ROOT|sed -e 's/\\\\/\\\\\\\\/g'`
|
||||
AC_SUBST(GNUSTEP_SHELL_SYSTEM_ROOT)
|
||||
GNUSTEP_SHELL_NETWORK_ROOT=`echo $GNUSTEP_NETWORK_ROOT|sed -e 's/\\\\/\\\\\\\\/g'`
|
||||
AC_SUBST(GNUSTEP_SHELL_NETWORK_ROOT)
|
||||
GNUSTEP_SHELL_LOCAL_ROOT=`echo $GNUSTEP_LOCAL_ROOT|sed -e 's/\\\\/\\\\\\\\/g'`
|
||||
AC_SUBST(GNUSTEP_SHELL_LOCAL_ROOT)
|
||||
GNUSTEP_SHELL_USER_DIR=`echo $GNUSTEP_USER_DIR|sed -e 's/\\\\/\\\\\\\\/g'`
|
||||
AC_SUBST(GNUSTEP_SHELL_USER_DIR)
|
||||
GNUSTEP_SHELL_USER_DEFAULTS_DIR=`echo $GNUSTEP_USER_DEFAULTS_DIR|sed -e 's/\\\\/\\\\\\\\/g'`
|
||||
AC_SUBST(GNUSTEP_SHELL_USER_DEFAULTS_DIR)
|
||||
GNUSTEP_SHELL_USER_CONFIG_FILE=`echo $GNUSTEP_USER_CONFIG_FILE|sed -e 's/\\\\/\\\\\\\\/g'`
|
||||
AC_SUBST(GNUSTEP_SHELL_USER_CONFIG_FILE)
|
||||
GNUSTEP_SHELL_CONFIG_FILE=`echo $GNUSTEP_CONFIG_FILE|sed -e 's/\\\\/\\\\\\\\/g'`
|
||||
AC_SUBST(GNUSTEP_SHELL_CONFIG_FILE)
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Produce the output files
|
||||
#--------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue