summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-08-26 15:50:08 (GMT)
committerBrad King <brad.king@kitware.com>2013-08-26 15:54:07 (GMT)
commitdf62f64db72b6f00657e9e739e1e117639dea9da (patch)
tree88a64dd1f0579ab27b18b0911c817c1e556b3259 /bootstrap
parent8da09f6ee1a59cbef6327d2a88ab8ba5f8b29b1a (diff)
downloadCMake-df62f64db72b6f00657e9e739e1e117639dea9da.zip
CMake-df62f64db72b6f00657e9e739e1e117639dea9da.tar.gz
CMake-df62f64db72b6f00657e9e739e1e117639dea9da.tar.bz2
Clean up install rules of CMake itself (#14371)
Ensure CMAKE_DATA_DIR, CMAKE_DOC_DIR, and CMAKE_MAN_DIR are always relative paths in CMake code, and set defaults accordingly. Use the install() command instead of install_files() and install_targets(). This is more modern and also avoids stripping of the first character from user-specified destinations. While at it, fix the default destinations reported in the bootstrap help.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap20
1 files changed, 10 insertions, 10 deletions
diff --git a/bootstrap b/bootstrap
index afb66e5..fb4a0a0 100755
--- a/bootstrap
+++ b/bootstrap
@@ -43,9 +43,9 @@ if [ "$cmake_version_tweak" != "0" ]; then
cmake_version="${cmake_version}.${cmake_version_tweak}"
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="share/cmake-${cmake_version_major}.${cmake_version_minor}"
+cmake_doc_dir="doc/cmake-${cmake_version_major}.${cmake_version_minor}"
+cmake_man_dir="man"
cmake_init_file=""
cmake_bootstrap_system_libs=""
cmake_bootstrap_qt_gui=""
@@ -160,8 +160,8 @@ 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}"
+ cmake_man_dir="documentation/man"
+ cmake_doc_dir="documentation/doc/cmake-${cmake_version}"
else
cmake_default_prefix="/usr/local"
fi
@@ -353,13 +353,13 @@ Configuration:
Directory and file names:
--prefix=PREFIX install files in tree rooted at PREFIX
- [${cmake_default_prefix}]
+ ['"${cmake_default_prefix}"']
--datadir=DIR install data files in PREFIX/DIR
- [/share/CMake]
+ ['"${cmake_data_dir}"']
--docdir=DIR install documentation files in PREFIX/DIR
- [/doc/CMake]
+ ['"${cmake_doc_dir}"']
--mandir=DIR install man pages files in PREFIX/DIR/manN
- [/man]
+ ['"${cmake_man_dir}"']
'
exit 10
}
@@ -1400,7 +1400,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 \"/${cmake_data_dir}\""
cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP"
# Regenerate configured headers