Explorar el Código

Merge topic 'bootstrap-test'

3e874e8834 bootstrap: Prefer “test … && test …” over “test … -a …”
1c06060288 bootstrap: Prefer “test …” over “[ … ]”

Acked-by: Kitware Robot <[email protected]>
Merge-request: !4704
Brad King hace 5 años
padre
commit
8406f71eae
Se han modificado 1 ficheros con 63 adiciones y 63 borrados
  1. 63 63
      bootstrap

+ 63 - 63
bootstrap

@@ -60,7 +60,7 @@ cmake_version_minor="`cmake_version_component MINOR`"
 cmake_version_patch="`cmake_version_component PATCH`"
 cmake_version_patch="`cmake_version_component PATCH`"
 cmake_version="${cmake_version_major}.${cmake_version_minor}.${cmake_version_patch}"
 cmake_version="${cmake_version_major}.${cmake_version_minor}.${cmake_version_patch}"
 cmake_version_rc="`cmake_version_component RC`"
 cmake_version_rc="`cmake_version_component RC`"
-if [ "$cmake_version_rc" != "" ]; then
+if test "$cmake_version_rc" != ""; then
   cmake_version="${cmake_version}-rc${cmake_version_rc}"
   cmake_version="${cmake_version}-rc${cmake_version_rc}"
 fi
 fi
 
 
@@ -209,13 +209,13 @@ esac
 
 
 # Choose the default install prefix.
 # Choose the default install prefix.
 if ${cmake_system_mingw}; then
 if ${cmake_system_mingw}; then
-  if [ "x${PROGRAMFILES}" != "x" ]; then
+  if test "x${PROGRAMFILES}" != "x"; then
     cmake_default_prefix=`cmake_fix_slashes "${PROGRAMFILES}/CMake"`
     cmake_default_prefix=`cmake_fix_slashes "${PROGRAMFILES}/CMake"`
-  elif [ "x${ProgramFiles}" != "x" ]; then
+  elif test "x${ProgramFiles}" != "x"; then
     cmake_default_prefix=`cmake_fix_slashes "${ProgramFiles}/CMake"`
     cmake_default_prefix=`cmake_fix_slashes "${ProgramFiles}/CMake"`
-  elif [ "x${SYSTEMDRIVE}" != "x" ]; then
+  elif test "x${SYSTEMDRIVE}" != "x"; then
     cmake_default_prefix=`cmake_fix_slashes "${SYSTEMDRIVE}/Program Files/CMake"`
     cmake_default_prefix=`cmake_fix_slashes "${SYSTEMDRIVE}/Program Files/CMake"`
-  elif [ "x${SystemDrive}" != "x" ]; then
+  elif test "x${SystemDrive}" != "x"; then
     cmake_default_prefix=`cmake_fix_slashes "${SystemDrive}/Program Files/CMake"`
     cmake_default_prefix=`cmake_fix_slashes "${SystemDrive}/Program Files/CMake"`
   else
   else
     cmake_default_prefix="c:/Program Files/CMake"
     cmake_default_prefix="c:/Program Files/CMake"
@@ -671,7 +671,7 @@ cmake_error()
   echo "Error when bootstrapping CMake:"
   echo "Error when bootstrapping CMake:"
   echo "$*"
   echo "$*"
   echo "---------------------------------------------"
   echo "---------------------------------------------"
-  if [ -f cmake_bootstrap.log ]; then
+  if test -f cmake_bootstrap.log; then
     echo "Log of errors: `pwd`/cmake_bootstrap.log"
     echo "Log of errors: `pwd`/cmake_bootstrap.log"
     #cat cmake_bootstrap.log
     #cat cmake_bootstrap.log
     echo "---------------------------------------------"
     echo "---------------------------------------------"
@@ -698,9 +698,9 @@ cmake_replace_string ()
   OUTFILE="$2"
   OUTFILE="$2"
   SEARCHFOR="$3"
   SEARCHFOR="$3"
   REPLACEWITH="$4"
   REPLACEWITH="$4"
-  if [ -f "${INFILE}" ] || ${cmake_system_openvms}; then
+  if test -f "${INFILE}" || ${cmake_system_openvms}; then
     sed "s/\@${SEARCHFOR}\@/${REPLACEWITH}/g" "${INFILE}" > "${OUTFILE}${_tmp}"
     sed "s/\@${SEARCHFOR}\@/${REPLACEWITH}/g" "${INFILE}" > "${OUTFILE}${_tmp}"
-    if [ -f "${OUTFILE}${_tmp}" ]; then
+    if test -f "${OUTFILE}${_tmp}"; then
       if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null ; then
       if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null ; then
         #echo "Files are the same"
         #echo "Files are the same"
         rm -f "${OUTFILE}${_tmp}"
         rm -f "${OUTFILE}${_tmp}"
@@ -719,7 +719,7 @@ cmake_kwsys_config_replace_string ()
   OUTFILE="$2"
   OUTFILE="$2"
   shift 2
   shift 2
   APPEND="$*"
   APPEND="$*"
-  if [ -f "${INFILE}" ] || ${cmake_system_openvms}; then
+  if test -f "${INFILE}" || ${cmake_system_openvms}; then
     echo "${APPEND}" > "${OUTFILE}${_tmp}"
     echo "${APPEND}" > "${OUTFILE}${_tmp}"
     sed "/./ {s/\@KWSYS_NAMESPACE\@/cmsys/g;
     sed "/./ {s/\@KWSYS_NAMESPACE\@/cmsys/g;
               s/@KWSYS_BUILD_SHARED@/${KWSYS_BUILD_SHARED}/g;
               s/@KWSYS_BUILD_SHARED@/${KWSYS_BUILD_SHARED}/g;
@@ -730,7 +730,7 @@ cmake_kwsys_config_replace_string ()
               s/@KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H@/${KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H}/g;
               s/@KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H@/${KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H}/g;
               s/@KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP@/${KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP}/g;
               s/@KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP@/${KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP}/g;
              }" "${INFILE}" >> "${OUTFILE}${_tmp}"
              }" "${INFILE}" >> "${OUTFILE}${_tmp}"
-    if [ -f "${OUTFILE}${_tmp}" ]; then
+    if test -f "${OUTFILE}${_tmp}"; then
       if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null ; then
       if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null ; then
         #echo "Files are the same"
         #echo "Files are the same"
         rm -f "${OUTFILE}${_tmp}"
         rm -f "${OUTFILE}${_tmp}"
@@ -787,7 +787,7 @@ cmake_try_run ()
   COMPILER=$1
   COMPILER=$1
   FLAGS=$2
   FLAGS=$2
   TESTFILE=$3
   TESTFILE=$3
-  if [ ! -f "${TESTFILE}" ]; then
+  if test ! -f "${TESTFILE}"; then
     echo "Test file ${TESTFILE} missing. Please verify your CMake source tree."
     echo "Test file ${TESTFILE} missing. Please verify your CMake source tree."
     exit 4
     exit 4
   fi
   fi
@@ -799,18 +799,18 @@ cmake_try_run ()
   echo "------------------------------------------"
   echo "------------------------------------------"
   "${COMPILER}" ${FLAGS} "${TESTFILE}" -o "${TMPFILE}"
   "${COMPILER}" ${FLAGS} "${TESTFILE}" -o "${TMPFILE}"
   RES=$?
   RES=$?
-  if [ "${RES}" -ne "0" ]; then
+  if test "${RES}" -ne "0"; then
     echo "Test failed to compile"
     echo "Test failed to compile"
     return 1
     return 1
   fi
   fi
-  if [ ! -f "${TMPFILE}" ] && [ ! -f "${TMPFILE}.exe" ]; then
+  if test ! -f "${TMPFILE}" && test ! -f "${TMPFILE}.exe"; then
     echo "Test failed to produce executable"
     echo "Test failed to produce executable"
     return 2
     return 2
   fi
   fi
   ./${TMPFILE}
   ./${TMPFILE}
   RES=$?
   RES=$?
   rm -f "${TMPFILE}"
   rm -f "${TMPFILE}"
-  if [ "${RES}" -ne "0" ]; then
+  if test "${RES}" -ne "0"; then
     echo "Test produced non-zero return code"
     echo "Test produced non-zero return code"
     return 3
     return 3
   fi
   fi
@@ -826,18 +826,18 @@ cmake_try_make ()
   echo "Try: ${MAKE_PROC}"
   echo "Try: ${MAKE_PROC}"
   "${MAKE_PROC}" ${MAKE_FLAGS}
   "${MAKE_PROC}" ${MAKE_FLAGS}
   RES=$?
   RES=$?
-  if [ "${RES}" -ne "0" ]; then
+  if test "${RES}" -ne "0"; then
     echo "${MAKE_PROC} does not work"
     echo "${MAKE_PROC} does not work"
     return 1
     return 1
   fi
   fi
-  if [ ! -f "test" ] && [ ! -f "test.exe" ]; then
+  if test ! -f "test" && test ! -f "test.exe"; then
     echo "${COMPILER} does not produce output"
     echo "${COMPILER} does not produce output"
     return 2
     return 2
   fi
   fi
   ./test
   ./test
   RES=$?
   RES=$?
   rm -f "test"
   rm -f "test"
-  if [ "${RES}" -ne "0" ]; then
+  if test "${RES}" -ne "0"; then
     echo "${MAKE_PROC} produces strange executable"
     echo "${MAKE_PROC} produces strange executable"
     return 3
     return 3
   fi
   fi
@@ -894,13 +894,13 @@ while test $# != 0; do
 done
 done
 
 
 # If verbose, display some information about bootstrap
 # If verbose, display some information about bootstrap
-if [ -n "${cmake_verbose}" ]; then
+if test -n "${cmake_verbose}"; then
   echo "---------------------------------------------"
   echo "---------------------------------------------"
   echo "Source directory: ${cmake_source_dir}"
   echo "Source directory: ${cmake_source_dir}"
   echo "Binary directory: ${cmake_binary_dir}"
   echo "Binary directory: ${cmake_binary_dir}"
   echo "Prefix directory: ${cmake_prefix_dir}"
   echo "Prefix directory: ${cmake_prefix_dir}"
   echo "System:           ${cmake_system}"
   echo "System:           ${cmake_system}"
-  if [ "x${cmake_parallel_make}" != "x" ]; then
+  if test "x${cmake_parallel_make}" != "x"; then
     echo "Doing parallel make: ${cmake_parallel_make}"
     echo "Doing parallel make: ${cmake_parallel_make}"
   fi
   fi
   echo ""
   echo ""
@@ -912,18 +912,18 @@ echo "`cmake_version_display`"
 
 
 # Check for in-source build
 # Check for in-source build
 cmake_in_source_build=
 cmake_in_source_build=
-if [ -f "${cmake_binary_dir}/Source/cmake.cxx" -a \
-     -f "${cmake_binary_dir}/Source/cmake.h" ]; then
-  if [ -n "${cmake_verbose}" ]; then
+if test -f "${cmake_binary_dir}/Source/cmake.cxx" &&
+     test -f "${cmake_binary_dir}/Source/cmake.h"; then
+  if test -n "${cmake_verbose}"; then
     echo "Warning: This is an in-source build"
     echo "Warning: This is an in-source build"
   fi
   fi
   cmake_in_source_build=TRUE
   cmake_in_source_build=TRUE
 fi
 fi
 
 
 # If this is not an in-source build, then Bootstrap stuff should not exist.
 # If this is not an in-source build, then Bootstrap stuff should not exist.
-if [ -z "${cmake_in_source_build}" ]; then
+if test -z "${cmake_in_source_build}"; then
   # Did somebody bootstrap in the source tree?
   # Did somebody bootstrap in the source tree?
-  if [ -d "${cmake_source_dir}/Bootstrap${_cmk}" ]; then
+  if test -d "${cmake_source_dir}/Bootstrap${_cmk}"; then
     cmake_error 10 "Found directory \"${cmake_source_dir}/Bootstrap${_cmk}\".
     cmake_error 10 "Found directory \"${cmake_source_dir}/Bootstrap${_cmk}\".
 Looks like somebody did bootstrap CMake in the source tree, but now you are
 Looks like somebody did bootstrap CMake in the source tree, but now you are
 trying to do bootstrap in the binary tree. Please remove Bootstrap${_cmk}
 trying to do bootstrap in the binary tree. Please remove Bootstrap${_cmk}
@@ -931,7 +931,7 @@ directory from the source tree."
   fi
   fi
   # Is there a cache in the source tree?
   # Is there a cache in the source tree?
   for cmake_problematic_file in ${CMAKE_PROBLEMATIC_FILES}; do
   for cmake_problematic_file in ${CMAKE_PROBLEMATIC_FILES}; do
-    if [ -f "${cmake_source_dir}/${cmake_problematic_file}" ]; then
+    if test -f "${cmake_source_dir}/${cmake_problematic_file}"; then
       cmake_error 10 "Found \"${cmake_source_dir}/${cmake_problematic_file}\".
       cmake_error 10 "Found \"${cmake_source_dir}/${cmake_problematic_file}\".
 Looks like somebody tried to build CMake in the source tree, but now you are
 Looks like somebody tried to build CMake in the source tree, but now you are
 trying to do bootstrap in the binary tree. Please remove \"${cmake_problematic_file}\"
 trying to do bootstrap in the binary tree. Please remove \"${cmake_problematic_file}\"
@@ -941,14 +941,14 @@ from the source tree."
 fi
 fi
 
 
 # Make bootstrap directory
 # Make bootstrap directory
-[ -d "${cmake_bootstrap_dir}" ] || mkdir "${cmake_bootstrap_dir}"
-if [ ! -d "${cmake_bootstrap_dir}" ]; then
+test -d "${cmake_bootstrap_dir}" || mkdir "${cmake_bootstrap_dir}"
+if test ! -d "${cmake_bootstrap_dir}"; then
   cmake_error 3 "Cannot create directory ${cmake_bootstrap_dir} to bootstrap CMake."
   cmake_error 3 "Cannot create directory ${cmake_bootstrap_dir} to bootstrap CMake."
 fi
 fi
 cd "${cmake_bootstrap_dir}"
 cd "${cmake_bootstrap_dir}"
 
 
-[ -d "cmsys" ] || mkdir "cmsys"
-if [ ! -d "cmsys" ]; then
+test -d "cmsys" || mkdir "cmsys"
+if test ! -d "cmsys"; then
   cmake_error 4 "Cannot create directory ${cmake_bootstrap_dir}/cmsys"
   cmake_error 4 "Cannot create directory ${cmake_bootstrap_dir}/cmsys"
 fi
 fi
 
 
@@ -959,7 +959,7 @@ rm -f "${cmake_bootstrap_dir}/cmVersionConfig.h${_tmp}"
 
 
 # If building in-source, remove any cmConfigure.h that may
 # If building in-source, remove any cmConfigure.h that may
 # have been created by a previous run of the bootstrap cmake.
 # have been created by a previous run of the bootstrap cmake.
-if [ -n "${cmake_in_source_build}" ]; then
+if test -n "${cmake_in_source_build}"; then
   rm -f "${cmake_source_dir}/Source/cmConfigure.h"
   rm -f "${cmake_source_dir}/Source/cmConfigure.h"
 fi
 fi
 
 
@@ -1044,7 +1044,7 @@ cmake_toolchain_detect()
   done
   done
 }
 }
 
 
-if [ -z "${CC}" -a -z "${CXX}" ]; then
+if test -z "${CC}" && test -z "${CXX}"; then
   cmake_toolchain_detect
   cmake_toolchain_detect
 fi
 fi
 
 
@@ -1058,9 +1058,9 @@ esac
 cmake_c_compiler=
 cmake_c_compiler=
 
 
 # If CC is set, use that for compiler, otherwise use list of known compilers
 # If CC is set, use that for compiler, otherwise use list of known compilers
-if [ -n "${cmake_toolchain}" ]; then
+if test -n "${cmake_toolchain}"; then
   eval cmake_c_compilers="\${cmake_toolchain_${cmake_toolchain}_CC}"
   eval cmake_c_compilers="\${cmake_toolchain_${cmake_toolchain}_CC}"
-elif [ -n "${CC}" ]; then
+elif test -n "${CC}"; then
   cmake_c_compilers="${CC}"
   cmake_c_compilers="${CC}"
 else
 else
   cmake_c_compilers="${CMAKE_KNOWN_C_COMPILERS}"
   cmake_c_compilers="${CMAKE_KNOWN_C_COMPILERS}"
@@ -1111,7 +1111,7 @@ for std in 11 99 90; do
 done
 done
 rm -f "${TMPFILE}.c"
 rm -f "${TMPFILE}.c"
 
 
-if [ -z "${cmake_c_compiler}" ]; then
+if test -z "${cmake_c_compiler}"; then
   cmake_error 6 "Cannot find appropriate C compiler on this system.
   cmake_error 6 "Cannot find appropriate C compiler on this system.
 Please specify one using environment variable CC.
 Please specify one using environment variable CC.
 See cmake_bootstrap.log for compilers attempted.
 See cmake_bootstrap.log for compilers attempted.
@@ -1126,9 +1126,9 @@ cmake_cxx_compiler=
 # On Mac OSX, CC is the same as cc, so make sure not to try CC as c++ compiler.
 # On Mac OSX, CC is the same as cc, so make sure not to try CC as c++ compiler.
 
 
 # If CC is set, use that for compiler, otherwise use list of known compilers
 # If CC is set, use that for compiler, otherwise use list of known compilers
-if [ -n "${cmake_toolchain}" ]; then
+if test -n "${cmake_toolchain}"; then
   eval cmake_cxx_compilers="\${cmake_toolchain_${cmake_toolchain}_CXX}"
   eval cmake_cxx_compilers="\${cmake_toolchain_${cmake_toolchain}_CXX}"
-elif [ -n "${CXX}" ]; then
+elif test -n "${CXX}"; then
   cmake_cxx_compilers="${CXX}"
   cmake_cxx_compilers="${CXX}"
 else
 else
   cmake_cxx_compilers="${CMAKE_KNOWN_CXX_COMPILERS}"
   cmake_cxx_compilers="${CMAKE_KNOWN_CXX_COMPILERS}"
@@ -1232,7 +1232,7 @@ for std in 17 14 11; do
 done
 done
 rm -f "${TMPFILE}.cxx"
 rm -f "${TMPFILE}.cxx"
 
 
-if [ -z "${cmake_cxx_compiler}" ]; then
+if test -z "${cmake_cxx_compiler}"; then
 cmake_error 7 "Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
 cmake_error 7 "Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
 Please specify one using environment variable CXX.
 Please specify one using environment variable CXX.
 The C++ flags are \"$cmake_cxx_flags\".
 The C++ flags are \"$cmake_cxx_flags\".
@@ -1259,7 +1259,7 @@ cmake_have_cxx_features=""
 for feature in ${cmake_cxx_features}; do
 for feature in ${cmake_cxx_features}; do
   feature_variable="cmake_have_cxx_${feature}"
   feature_variable="cmake_have_cxx_${feature}"
   eval "feature_value=\${${feature_variable}}"
   eval "feature_value=\${${feature_variable}}"
-  if [ "${feature_value}" -eq "1" ]; then
+  if test "${feature_value}" -eq "1"; then
     cmake_have_cxx_features="${cmake_have_cxx_features} -DCMake_HAVE_CXX_`cmake_toupper ${feature}`=${feature_value}"
     cmake_have_cxx_features="${cmake_have_cxx_features} -DCMake_HAVE_CXX_`cmake_toupper ${feature}`=${feature_value}"
   fi
   fi
 done
 done
@@ -1271,7 +1271,7 @@ cmake_make_processor=
 cmake_make_flags=
 cmake_make_flags=
 
 
 # If MAKE is set, use that for make processor, otherwise use list of known make
 # If MAKE is set, use that for make processor, otherwise use list of known make
-if [ -n "${MAKE}" ]; then
+if test -n "${MAKE}"; then
   cmake_make_processors="${MAKE}"
   cmake_make_processors="${MAKE}"
 else
 else
   cmake_make_processors="${CMAKE_KNOWN_MAKE_PROCESSORS}"
   cmake_make_processors="${CMAKE_KNOWN_MAKE_PROCESSORS}"
@@ -1290,20 +1290,20 @@ echo '
 int main(){ printf("1%c", (char)0x0a); return 0; }
 int main(){ printf("1%c", (char)0x0a); return 0; }
 ' > "test.c"
 ' > "test.c"
 cmake_original_make_flags="${cmake_make_flags}"
 cmake_original_make_flags="${cmake_make_flags}"
-if [ "x${cmake_parallel_make}" != "x" ]; then
+if test "x${cmake_parallel_make}" != "x"; then
   cmake_make_flags="${cmake_make_flags} -j ${cmake_parallel_make}"
   cmake_make_flags="${cmake_make_flags} -j ${cmake_parallel_make}"
 fi
 fi
 for a in ${cmake_make_processors}; do
 for a in ${cmake_make_processors}; do
-  if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then
+  if test -z "${cmake_make_processor}" && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then
     cmake_make_processor="${a}"
     cmake_make_processor="${a}"
   fi
   fi
 done
 done
 cmake_full_make_flags="${cmake_make_flags}"
 cmake_full_make_flags="${cmake_make_flags}"
-if [ "x${cmake_original_make_flags}" != "x${cmake_make_flags}" ]; then
-  if [ -z "${cmake_make_processor}" ]; then
+if test "x${cmake_original_make_flags}" != "x${cmake_make_flags}"; then
+  if test -z "${cmake_make_processor}"; then
     cmake_make_flags="${cmake_original_make_flags}"
     cmake_make_flags="${cmake_original_make_flags}"
     for a in ${cmake_make_processors}; do
     for a in ${cmake_make_processors}; do
-      if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then
+      if test -z "${cmake_make_processor}" && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then
         cmake_make_processor="${a}"
         cmake_make_processor="${a}"
       fi
       fi
     done
     done
@@ -1311,13 +1311,13 @@ if [ "x${cmake_original_make_flags}" != "x${cmake_make_flags}" ]; then
 fi
 fi
 cd "${cmake_bootstrap_dir}"
 cd "${cmake_bootstrap_dir}"
 
 
-if [ -z "${cmake_make_processor}" ]; then
+if test -z "${cmake_make_processor}"; then
   cmake_error 8 "Cannot find appropriate Makefile processor on this system.
   cmake_error 8 "Cannot find appropriate Makefile processor on this system.
 Please specify one using environment variable MAKE."
 Please specify one using environment variable MAKE."
 fi
 fi
 rm -rf "${cmake_bootstrap_dir}/${TMPFILE}"
 rm -rf "${cmake_bootstrap_dir}/${TMPFILE}"
 echo "Makefile processor on this system is: ${cmake_make_processor}"
 echo "Makefile processor on this system is: ${cmake_make_processor}"
-if [ "x${cmake_full_make_flags}" != "x${cmake_make_flags}" ]; then
+if test "x${cmake_full_make_flags}" != "x${cmake_make_flags}"; then
   echo "---------------------------------------------"
   echo "---------------------------------------------"
   echo "Makefile processor ${cmake_make_processor} does not support parallel build"
   echo "Makefile processor ${cmake_make_processor} does not support parallel build"
   echo "---------------------------------------------"
   echo "---------------------------------------------"
@@ -1382,7 +1382,7 @@ else
   echo "${cmake_cxx_compiler} does not have <ext/stdio_filebuf.h>"
   echo "${cmake_cxx_compiler} does not have <ext/stdio_filebuf.h>"
 fi
 fi
 
 
-if [ -n "${cmake_ccache_enabled}" ]; then
+if test -n "${cmake_ccache_enabled}"; then
   echo "Building CMake with ccache"
   echo "Building CMake with ccache"
   cmake_c_compiler="ccache ${cmake_c_compiler}"
   cmake_c_compiler="ccache ${cmake_c_compiler}"
   cmake_cxx_compiler="ccache ${cmake_cxx_compiler}"
   cmake_cxx_compiler="ccache ${cmake_cxx_compiler}"
@@ -1532,15 +1532,15 @@ else
 fi
 fi
 uv_c_flags="${uv_c_flags} `cmake_escape "-I${cmake_source_dir}/Utilities/cmlibuv/src"`"
 uv_c_flags="${uv_c_flags} `cmake_escape "-I${cmake_source_dir}/Utilities/cmlibuv/src"`"
 
 
-if [ "x${cmake_ansi_cxx_flags}" != "x" ]; then
+if test "x${cmake_ansi_cxx_flags}" != "x"; then
   cmake_cxx_flags="${cmake_ansi_cxx_flags} ${cmake_cxx_flags}"
   cmake_cxx_flags="${cmake_ansi_cxx_flags} ${cmake_cxx_flags}"
 fi
 fi
 
 
-if [ "x${cmake_c_flags}" != "x" ]; then
+if test "x${cmake_c_flags}" != "x"; then
   cmake_c_flags="${cmake_c_flags} "
   cmake_c_flags="${cmake_c_flags} "
 fi
 fi
 
 
-if [ "x${cmake_cxx_flags}" != "x" ]; then
+if test "x${cmake_cxx_flags}" != "x"; then
   cmake_cxx_flags="${cmake_cxx_flags} "
   cmake_cxx_flags="${cmake_cxx_flags} "
 fi
 fi
 
 
@@ -1637,42 +1637,42 @@ set (CMAKE_XDGDATA_DIR "'"${cmake_xdgdata_dir}"'" CACHE PATH "Install location f
 ' > "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 ' > "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 
 
 # Add configuration settings given as command-line options.
 # Add configuration settings given as command-line options.
-if [ "x${cmake_bootstrap_qt_gui}" != "x" ]; then
+if test "x${cmake_bootstrap_qt_gui}" != "x"; then
   echo '
   echo '
 set (BUILD_QtDialog '"${cmake_bootstrap_qt_gui}"' CACHE BOOL "Build Qt dialog for CMake" FORCE)
 set (BUILD_QtDialog '"${cmake_bootstrap_qt_gui}"' CACHE BOOL "Build Qt dialog for CMake" FORCE)
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 fi
 fi
-if [ "x${cmake_bootstrap_qt_qmake}" != "x" ]; then
+if test "x${cmake_bootstrap_qt_qmake}" != "x"; then
   echo '
   echo '
 set (QT_QMAKE_EXECUTABLE "'"${cmake_bootstrap_qt_qmake}"'" CACHE FILEPATH "Location of Qt qmake" FORCE)
 set (QT_QMAKE_EXECUTABLE "'"${cmake_bootstrap_qt_qmake}"'" CACHE FILEPATH "Location of Qt qmake" FORCE)
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 fi
 fi
-if [ "x${cmake_sphinx_info}" != "x" ]; then
+if test "x${cmake_sphinx_info}" != "x"; then
   echo '
   echo '
 set (SPHINX_INFO "'"${cmake_sphinx_info}"'" CACHE BOOL "Build Info manual with Sphinx" FORCE)
 set (SPHINX_INFO "'"${cmake_sphinx_info}"'" CACHE BOOL "Build Info manual with Sphinx" FORCE)
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 fi
 fi
-if [ "x${cmake_sphinx_man}" != "x" ]; then
+if test "x${cmake_sphinx_man}" != "x"; then
   echo '
   echo '
 set (SPHINX_MAN "'"${cmake_sphinx_man}"'" CACHE BOOL "Build man pages with Sphinx" FORCE)
 set (SPHINX_MAN "'"${cmake_sphinx_man}"'" CACHE BOOL "Build man pages with Sphinx" FORCE)
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 fi
 fi
-if [ "x${cmake_sphinx_html}" != "x" ]; then
+if test "x${cmake_sphinx_html}" != "x"; then
   echo '
   echo '
 set (SPHINX_HTML "'"${cmake_sphinx_html}"'" CACHE BOOL "Build html help with Sphinx" FORCE)
 set (SPHINX_HTML "'"${cmake_sphinx_html}"'" CACHE BOOL "Build html help with Sphinx" FORCE)
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 fi
 fi
-if [ "x${cmake_sphinx_qthelp}" != "x" ]; then
+if test "x${cmake_sphinx_qthelp}" != "x"; then
   echo '
   echo '
 set (SPHINX_QTHELP "'"${cmake_sphinx_qthelp}"'" CACHE BOOL "Build qch help with Sphinx" FORCE)
 set (SPHINX_QTHELP "'"${cmake_sphinx_qthelp}"'" CACHE BOOL "Build qch help with Sphinx" FORCE)
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 fi
 fi
-if [ "x${cmake_sphinx_build}" != "x" ]; then
+if test "x${cmake_sphinx_build}" != "x"; then
   echo '
   echo '
 set (SPHINX_EXECUTABLE "'"${cmake_sphinx_build}"'" CACHE FILEPATH "Location of Qt sphinx-build" FORCE)
 set (SPHINX_EXECUTABLE "'"${cmake_sphinx_build}"'" CACHE FILEPATH "Location of Qt sphinx-build" FORCE)
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 fi
 fi
-if [ "x${cmake_sphinx_flags}" != "x" ]; then
+if test "x${cmake_sphinx_flags}" != "x"; then
   echo '
   echo '
 set (SPHINX_FLAGS [==['"${cmake_sphinx_flags}"']==] CACHE STRING "Flags to pass to sphinx-build" FORCE)
 set (SPHINX_FLAGS [==['"${cmake_sphinx_flags}"']==] CACHE STRING "Flags to pass to sphinx-build" FORCE)
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
@@ -1682,7 +1682,7 @@ fi
 # specification of cmake_init_file.
 # specification of cmake_init_file.
 (
 (
 cd "${cmake_binary_dir}"
 cd "${cmake_binary_dir}"
-if [ -f "${cmake_init_file}" ]; then
+if test -f "${cmake_init_file}"; then
   cat "${cmake_init_file}" >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
   cat "${cmake_init_file}" >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 fi
 fi
 )
 )
@@ -1690,13 +1690,13 @@ fi
 echo "---------------------------------------------"
 echo "---------------------------------------------"
 
 
 # Run make to build bootstrap cmake
 # Run make to build bootstrap cmake
-if [ "x${cmake_parallel_make}" != "x" ]; then
+if test "x${cmake_parallel_make}" != "x"; then
   ${cmake_make_processor} ${cmake_make_flags}
   ${cmake_make_processor} ${cmake_make_flags}
 else
 else
   ${cmake_make_processor}
   ${cmake_make_processor}
 fi
 fi
 RES=$?
 RES=$?
-if [ "${RES}" -ne "0" ]; then
+if test "${RES}" -ne "0"; then
   cmake_error 9 "Problem while running ${cmake_make_processor}"
   cmake_error 9 "Problem while running ${cmake_make_processor}"
 fi
 fi
 cd "${cmake_binary_dir}"
 cd "${cmake_binary_dir}"
@@ -1715,12 +1715,12 @@ export LDFLAGS
 
 
 # Run bootstrap CMake to configure real CMake
 # Run bootstrap CMake to configure real CMake
 cmake_options="-DCMAKE_BOOTSTRAP=1"
 cmake_options="-DCMAKE_BOOTSTRAP=1"
-if [ -n "${cmake_verbose}" ]; then
+if test -n "${cmake_verbose}"; then
   cmake_options="${cmake_options} -DCMAKE_VERBOSE_MAKEFILE=1"
   cmake_options="${cmake_options} -DCMAKE_VERBOSE_MAKEFILE=1"
 fi
 fi
 "${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_options} ${cmake_bootstrap_system_libs} "$@"
 "${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_options} ${cmake_bootstrap_system_libs} "$@"
 RES=$?
 RES=$?
-if [ "${RES}" -ne "0" ]; then
+if test "${RES}" -ne "0"; then
   cmake_error 11 "Problem while running initial CMake"
   cmake_error 11 "Problem while running initial CMake"
 fi
 fi