diff options
author | David Cole <david.cole@kitware.com> | 2012-05-29 19:36:47 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-05-29 19:36:47 (GMT) |
commit | 73cb20187c20f9d22ff8ed07195cf7ab572fb7ff (patch) | |
tree | bca82a2b57e11f4598f402fa0e7e8f40078ba78f /bootstrap | |
parent | 19af2416b71dcb77d10367944270bee6d67954af (diff) | |
parent | e5dc76894ae8fbc95126ebb54a838e0342686b96 (diff) | |
download | CMake-73cb20187c20f9d22ff8ed07195cf7ab572fb7ff.zip CMake-73cb20187c20f9d22ff8ed07195cf7ab572fb7ff.tar.gz CMake-73cb20187c20f9d22ff8ed07195cf7ab572fb7ff.tar.bz2 |
Merge topic 'bootstrap-old-sh'
e5dc768 bootstrap: Port back to old shells (#13199)
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 27 |
1 files changed, 18 insertions, 9 deletions
@@ -449,6 +449,12 @@ cmake_escape () echo $1 | sed "s/ /\\\\ /g" } +# Strip prefix from argument +cmake_arg () +{ + echo "$1" | sed "s/^${2-[^=]*=}//" +} + # Write message to the log cmake_log () { @@ -533,21 +539,24 @@ cmake_ccache_enabled= cmake_prefix_dir="${cmake_default_prefix}" while test $# != 0; do case "$1" in - --prefix=*) cmake_prefix_dir=`cmake_fix_slashes "${1#*=}"` ;; - --parallel=*) cmake_parallel_make="${1#*=}" ;; - --datadir=*) cmake_data_dir="${1#*=}" ;; - --docdir=*) cmake_doc_dir="${1#*=}" ;; - --mandir=*) cmake_man_dir="${1#*=}" ;; - --init=*) cmake_init_file="${1#*=}" ;; + --prefix=*) dir=`cmake_arg "$1"` + cmake_prefix_dir=`cmake_fix_slashes "$dir"` ;; + --parallel=*) cmake_parallel_make=`cmake_arg "$1"` ;; + --datadir=*) cmake_data_dir=`cmake_arg "$1"` ;; + --docdir=*) cmake_doc_dir=`cmake_arg "$1"` ;; + --mandir=*) cmake_man_dir=`cmake_arg "$1"` ;; + --init=*) cmake_init_file=`cmake_arg "$1"` ;; --system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;; --no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;; --system-bzip2|--system-curl|--system-expat|--system-libarchive|--system-zlib) - cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper ${1#--system-}`=1" ;; + lib=`cmake_arg "$1" "--system-"` + cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=1" ;; --no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-libarchive|--no-system-zlib) - cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper ${1#--no-system-}`=0" ;; + lib=`cmake_arg "$1" "--no-system-"` + cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=0" ;; --qt-gui) cmake_bootstrap_qt_gui="1" ;; --no-qt-gui) cmake_bootstrap_qt_gui="0" ;; - --qt-qmake=*) cmake_bootstrap_qt_qmake="${1#*=}" ;; + --qt-qmake=*) cmake_bootstrap_qt_qmake=`cmake_arg "$1"` ;; --help) cmake_usage ;; --version) cmake_version_display ; exit 2 ;; --verbose) cmake_verbose=TRUE ;; |