HvD: Added extra tests to detect when we are on a machine with an OS that

has a case insensitive file system, e.g. CYGWIN, CYGNUS, INTERIX or MACX.
We need to set NWCHEM_TARGET correctly for these platforms otherwise file
names clash and cause bad things to happen.
This commit is contained in:
Huub Van Dam 2012-02-08 07:06:21 +00:00
parent 693a602450
commit bb1615ecce
2 changed files with 38 additions and 3 deletions

View file

@ -1174,9 +1174,26 @@ if [ ${#NWCHEM_OS} -eq 0 ] ; then
if [ ${#NWCHEM_OS} -ne 0 ] ; then
if [ ${NWCHEM_OS} == "DARWIN" ] ; then
export NWCHEM_OS=MACX
fi
if [ ${NWCHEM_OS} == "AIX" ] ; then
elif [ ${NWCHEM_OS} == "AIX" ] ; then
export NWCHEM_OS=IBM
elif [ `expr match ${NWCHEM_OS} CYGWIN` != "0" ] ; then
export NWCHEM_OS=CYGWIN
if [ ${#NWCHEM_TARGET} -eq 0 ] ; then
# There is no CYGWIN64 target so set NWCHEM_TARGET here
export NWCHEM_TARGET=${NWCHEM_OS}
fi
elif [ `expr match ${NWCHEM_OS} CYGNUS` != "0" ] ; then
export NWCHEM_OS=CYGNUS
if [ ${#NWCHEM_TARGET} -eq 0 ] ; then
# There is no CYGNUS64 target so set NWCHEM_TARGET here
export NWCHEM_TARGET=${NWCHEM_OS}
fi
elif [ `expr match ${NWCHEM_OS} INTERIX` != "0" ] ; then
export NWCHEM_OS=INTERIX
if [ ${#NWCHEM_TARGET} -eq 0 ] ; then
# There is no INTERIX64 target so set NWCHEM_TARGET here
export NWCHEM_TARGET=${NWCHEM_OS}
fi
fi
fi
fi

View file

@ -29,7 +29,25 @@ if [ -d ${target} ] ; then
fi
cp -a ${source} ${target}
export NWCHEM_TOP=${target}
export NWCHEM_TARGET=LINUX64
if [ ${#NWCHEM_TARGET} -eq 0 ] ; then
NWCHEM_OS=`uname | tr '[a-z]' '[A-Z]'`
if [ $? -ne 0 ] ; then
unset NWCHEM_OS
fi
if [ ${#NWCHEM_OS} -ne 0 ] ; then
if [ ${NWCHEM_OS} == "DARWIN" ] ; then
export NWCHEM_TARGET=MACX64
elif [ `expr match ${NWCHEM_OS} CYGWIN` != "0" ] ; then
export NWCHEM_TARGET=CYGWIN
elif [ `expr match ${NWCHEM_OS} CYGNUS` != "0" ] ; then
export NWCHEM_TARGET=CYGNUS
elif [ `expr match ${NWCHEM_OS} INTERIX` != "0" ] ; then
export NWCHEM_TARGET=INTERIX
else
export NWCHEM_TARGET=LINUX64
fi
fi
fi
#
# Make sure we include the Global Arrays
#