关闭

Linux configure参数解释

发表于:2010-7-06 10:21

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:未知    来源:51Testing软件测试网采编

  在源码树中运行'configure'是不必要的同时也是不好的。一个由'configure'产生的良好的'Makefile'可以构筑源码属于另 一棵树的软件包。在一个独立于源码的树中构筑派生的文件的好处是很明显的:派生的文件,如目标文件,会凌乱的散布于源码树。这也使在另一个不同的系统或用 不同的配置选项构筑同样的目标文件非常困难。建议使用三棵树:一棵源码树(source tree),一棵构筑树(build tree),一棵安装树(install tree)。这里有一个很接近的例子,是使用这种方法来构筑GNU malloc包:

  $ gtar zxf mmalloc-1.0.tar.gz
  $ mkdir build && cd build
  $ ../mmalloc-1.0/configure
  creating cache ./config.cache
  checking for gcc... gcc
  checking whether the C compiler (gcc ) works... yes
  checking whether the C compiler (gcc ) is a cross-compiler... no
  checking whether we are using GNU C... yes
  checking whether gcc accepts -g... yes
  checking for a BSD compatible install... /usr/bin/install -c
  checking host system type... i586-pc-linux-gnu
  checking build system type... i586-pc-linux-gnu
  checking for ar... ar
  checking for ranlib... ranlib
  checking how to run the C preprocessor... gcc -E
  checking for unistd.h... yes
  checking for getpagesize... yes
  checking for working mmap... yes
  checking for limits.h... yes
  checking for stddef.h... yes
  updating cache ../config.cache
  creating ./config.status

  这样这棵构筑树就被配置了,下面可以继续构筑和安装这个包到默认的位置'/usr/local':

  $ make all && make install

  一个软件包通过编译源代码安装后,如何完全的卸载??

  如果原先的source还在的话,很多source的Makefile都有写uninstall规则,直接在Souce里make uninstall就可行,不过碰到无良作者没写的,那一句一句看Makefile里install部分他都干了些什么,然后挨个删除。

  如果source没了.....那就一边郁闷吧

  到目前为止, 我装的都可以make uninstall.......

  (因为总是不小心装错地方, 结果就make uninstall&&make clean,然后重新configure......)

44/4<1234
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号