本文以编译cmake-3.20.0为例,尝试解释./bootstrap、make 和 make install 执行了哪些操作

  1. sudo apt-get install -y libssl-dev
  2. wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0.tar.gz
  3. tar -zxvf cmake-3.20.0.tar.gz
  4. cd cmake-3.20.0
  5. ./bootstrap
  6. make
  7. sudo make install

make install执行了哪些操作?

把make好的文件安装到了

  • /usr/local/share/cmake-3.20/ 目录下面
  • /usr/local/bin/cmake
  • /usr/local/bin/ctest
  • /usr/local/bin/cpack

后面可以尝试 make install 指定安装路径