diff options
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 70 |
1 files changed, 59 insertions, 11 deletions
@@ -23,6 +23,15 @@ cmake_version_component() " } +# Install destination extraction function. +cmake_install_dest_default() +{ + cat "${cmake_source_dir}/Source/CMakeInstallDestinations.cmake" | sed -n ' +/^ *set(CMAKE_'"${1}"'_DIR_DEFAULT.*) # '"${2}"'$/ { + s/^ *set(CMAKE_'"${1}"'_DIR_DEFAULT *"\([^"]*\)").*$/\1/;p;q;} +' +} + cmake_toupper() { echo "$1" | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' @@ -42,18 +51,30 @@ cmake_version_tweak="`cmake_version_component TWEAK`" if [ "$cmake_version_tweak" != "0" ]; then cmake_version="${cmake_version}.${cmake_version_tweak}" fi +cmake_version_rc="`cmake_version_component RC`" +if [ "$cmake_version_rc" != "" ]; then + cmake_version="${cmake_version}-rc${cmake_version_rc}" +fi -cmake_data_dir="share/cmake-${cmake_version_major}.${cmake_version_minor}" -cmake_doc_dir="doc/cmake-${cmake_version_major}.${cmake_version_minor}" -cmake_man_dir="man" +cmake_data_dir_keyword="OTHER" +cmake_doc_dir_keyword="OTHER" +cmake_man_dir_keyword="OTHER" +cmake_data_dir="" +cmake_doc_dir="" +cmake_man_dir="" cmake_init_file="" cmake_bootstrap_system_libs="" cmake_bootstrap_qt_gui="" cmake_bootstrap_qt_qmake="" +cmake_sphinx_man="" +cmake_sphinx_html="" +cmake_sphinx_build="" # Determine whether this is a Cygwin environment. if echo "${cmake_system}" | grep CYGWIN >/dev/null 2>&1; then cmake_system_cygwin=true + cmake_doc_dir_keyword="CYGWIN" + cmake_man_dir_keyword="CYGWIN" else cmake_system_cygwin=false fi @@ -75,6 +96,8 @@ fi # Determine whether this is BeOS if echo "${cmake_system}" | grep BeOS >/dev/null 2>&1; then cmake_system_beos=true + cmake_doc_dir_keyword="HAIKU" + cmake_man_dir_keyword="HAIKU" else cmake_system_beos=false fi @@ -82,6 +105,8 @@ fi # Determine whether this is Haiku if echo "${cmake_system}" | grep Haiku >/dev/null 2>&1; then cmake_system_haiku=true + cmake_doc_dir_keyword="HAIKU" + cmake_man_dir_keyword="HAIKU" else cmake_system_haiku=false fi @@ -160,12 +185,15 @@ if ${cmake_system_mingw}; then fi elif ${cmake_system_haiku}; then cmake_default_prefix=`finddir B_COMMON_DIRECTORY` - cmake_man_dir="documentation/man" - cmake_doc_dir="documentation/doc/cmake-${cmake_version}" else cmake_default_prefix="/usr/local" fi +# Lookup default install destinations. +cmake_data_dir_default="`cmake_install_dest_default DATA ${cmake_data_dir_keyword}`" +cmake_doc_dir_default="`cmake_install_dest_default DOC ${cmake_doc_dir_keyword}`" +cmake_man_dir_default="`cmake_install_dest_default MAN ${cmake_man_dir_keyword}`" + CMAKE_KNOWN_C_COMPILERS="cc gcc xlc icc tcc" CMAKE_KNOWN_CXX_COMPILERS="aCC xlC CC g++ c++ icc como " CMAKE_KNOWN_MAKE_PROCESSORS="gmake make" @@ -205,7 +233,6 @@ CMAKE_CXX_SOURCES="\ cmDepends \ cmDependsC \ cmDocumentationFormatter \ - cmDocumentationFormatterText \ cmPolicies \ cmProperty \ cmPropertyMap \ @@ -255,7 +282,6 @@ CMAKE_CXX_SOURCES="\ cmTest \ cmCustomCommand \ cmCustomCommandGenerator \ - cmDocumentVariables \ cmCacheManager \ cmListFileCache \ cmComputeLinkDepends \ @@ -352,15 +378,19 @@ Configuration: --no-qt-gui do not build the Qt-based GUI (default) --qt-qmake=<qmake> use <qmake> as the qmake executable to find Qt + --sphinx-man build man pages with Sphinx + --sphinx-html build html help with Sphinx + --sphinx-build=<sb> use <sb> as the sphinx-build executable + Directory and file names: --prefix=PREFIX install files in tree rooted at PREFIX ['"${cmake_default_prefix}"'] --datadir=DIR install data files in PREFIX/DIR - ['"${cmake_data_dir}"'] + ['"${cmake_data_dir_default}"'] --docdir=DIR install documentation files in PREFIX/DIR - ['"${cmake_doc_dir}"'] + ['"${cmake_doc_dir_default}"'] --mandir=DIR install man pages files in PREFIX/DIR/manN - ['"${cmake_man_dir}"'] + ['"${cmake_man_dir_default}"'] ' exit 10 } @@ -583,6 +613,9 @@ while test $# != 0; do --qt-gui) cmake_bootstrap_qt_gui="1" ;; --no-qt-gui) cmake_bootstrap_qt_gui="0" ;; --qt-qmake=*) cmake_bootstrap_qt_qmake=`cmake_arg "$1"` ;; + --sphinx-man) cmake_sphinx_man="1" ;; + --sphinx-html) cmake_sphinx_html="1" ;; + --sphinx-build=*) cmake_sphinx_build=`cmake_arg "$1"` ;; --help) cmake_usage ;; --version) cmake_version_display ; exit 2 ;; --verbose) cmake_verbose=TRUE ;; @@ -1404,7 +1437,7 @@ cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_PATCH ${cmake_versi cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_TWEAK ${cmake_version_tweak}" cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION \"${cmake_version}\"" cmake_report cmConfigure.h${_tmp} "#define CMAKE_ROOT_DIR \"${cmake_root_dir}\"" -cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/${cmake_data_dir}\"" +cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/bootstrap-not-insalled\"" cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP" # Regenerate configured headers @@ -1540,6 +1573,21 @@ if [ "x${cmake_bootstrap_qt_qmake}" != "x" ]; then set (QT_QMAKE_EXECUTABLE "'"${cmake_bootstrap_qt_qmake}"'" CACHE FILEPATH "Location of Qt qmake" FORCE) ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" fi +if [ "x${cmake_sphinx_man}" != "x" ]; then + echo ' +set (SPHINX_MAN "'"${cmake_sphinx_man}"'" CACHE FILEPATH "Build man pages with Sphinx" FORCE) +' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" +fi +if [ "x${cmake_sphinx_html}" != "x" ]; then + echo ' +set (SPHINX_HTML "'"${cmake_sphinx_html}"'" CACHE FILEPATH "Build html help with Sphinx" FORCE) +' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" +fi +if [ "x${cmake_sphinx_build}" != "x" ]; then + echo ' +set (SPHINX_EXECUTABLE "'"${cmake_sphinx_build}"'" CACHE FILEPATH "Location of Qt sphinx-build" FORCE) +' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" +fi # Add user-specified settings. Handle relative-path case for # specification of cmake_init_file. |