[译]SCons 一个用来取代 Makefile 的简单,高效自动构建项目工具

本文翻译自Scons官网的介绍,由于是本人第一次翻译英文文章,不准确之处希望大家多多给我指出

转载请表明本文地址:http://blog.youkuaiyun.com/jiangsq12345/archive/2011/03/12/6243880.aspx

 

Scons 是开源的下一代软件编译工具。Scons是先进的,夸平台的用来取代传统的Make 工具,它也具有类似于 autoconf/automake 和编译缓存ccache 等功能。总而言之,Scons是一个用简单,更可靠和更快速的方法编译软件。

 


Scons 是一个神奇的的编译系统,用Python(1.5.2)编写,它拥有能自动处理文件间的依赖问题,夸平台等优秀的功能。我可以说:在不久将来,它会成为编译C/C++项目的最好的选择。

-----Zed A. Shaw, Bombyx 项目负责人

 


SCons的优秀之处:

  • 配置文件用Python脚本编写 ------ 用一个强大的真正编程语言来解决编译问题
  • 更加可靠,为 C,C++和Fortran 内置了自动文件依赖分析处理  ------  不再需要 "make depend" 或者 "make clean "来描述所有的依赖关系。自动的依赖关系分析功能也使扩展变得更加简单,只要为编程语言或者文件类型定义依赖扫描。
  • 内置支持 C, C++, D, Java, Fortran, Yacc, Lex, Qt and SWIG, and building TeX and LaTeX documents。--- 更容易扩展
  • 内置支持通过SCCS, RCS, CVS, BitKeeper and Perforce获取源文件
  • 内置支持Microsoft Visual Studio .NET 和旧的 Visual Studio版本,包括对 .dsp , .dsw , .sln and .vcproj 文件的管理.
  • 使用MD5签名技术来检查编译的改变。 还可通过选项配置传统的时间戳。
  • 支持并行编译  -- 类似于 make -j ,但是可以保持N个任务同步运行并且跟文件夹的层次结构无关。
  • 内嵌 Autoconf  -----比分说支持寻找 #include 文件,函数库,函数 和 类型。
  • 一个了解所有依赖关系的视角
  • 缓存中具有内置文件共享能力,使提高多任务创建速度  ----- ccache 支持所有目标文件类型, 不仅仅是 C/C++ 编译
  • 支持夸平台,目前以知支持 Linux, 其他 POSIX 系统 (包括 AIX, *BSD systems, HP/UX, IRIX and Solaris), Windows NT, Mac OS X, and OS/2.

 

 

以下为原文内容,摘自Scons官网,如果翻译不到位可以自己理解,也希望给指出。我会尽快更改方便其他朋友阅读,谢谢

======================================

SCons is an Open Source software construction tool—that is, a next-generation build tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automakeccache . In short, SCons is an easier, more reliable and faster way to build software. and compiler caches such as

" is a fantastic build system, written in Python (1.5.2) that does lots of nice things like automated dependencies, cross platform operation, configuration, and other great stuff. I would have to say that it is probably going to be the best thing for building C/C++ projects in the near future."
— Zed A. Shaw, Bombyx project lead

What makes SCons better?

  • Configuration files are Python scripts--use the power of a real programming language to solve build problems.
  • Reliable, automatic dependency analysis built-in for C, C++ and Fortran--no more "make depend" or "make clean" to get all of the dependencies. Dependency analysis is easily extensible through user-defined dependency Scanners for other languages or file types.
  • Built-in support for C, C++, D, Java, Fortran, Yacc, Lex, Qt and SWIG, and building TeX and LaTeX documents. Easily extensible through user-defined Builders for other languages or file types.
  • Building from central repositories of source code and/or pre-built targets.
  • Built-in support for fetching source files from SCCS, RCS, CVS, BitKeeper and Perforce.
  • Built-in support for Microsoft Visual Studio .NET and past Visual Studio versions, including generation of .dsp , .dsw , .sln and .vcproj files.
  • Reliable detection of build changes using MD5 signatures; optional, configurable support for traditional timestamps.
  • Improved support for parallel builds--like make -j but keeps N jobs running simultaneously regardless of directory hierarchy.
  • Integrated Autoconf -like support for finding #include files, libraries, functions and typedefs.
  • Global view of all dependencies--no more multiple build passes or reordering targets to build everything.
  • Ability to share built files in a cache to speed up multiple builds--like ccache but for any type of target file, not just C/C++ compilation.
  • Designed from the ground up for cross-platform builds, and known to work on Linux, other POSIX systems (including AIX, *BSD systems, HP/UX, IRIX and Solaris), Windows NT, Mac OS X, and OS/2.


"We are using [SCons] on Windows (MSVC and Intel compilers), Linux, IRIX and Mac OS X (gcc and two versions of CodeWarrior). Handles all of those with ease. It can do things like properly handle dependencies on auto-generated source and header files, which would be a nightmare in make."
—SilentTristero (Slashdot user), 10 July 2003 post

 

 

 

 

参考链接:

Scons百度百科: http://baike.baidu.com/view/1959223.htm

Scons官网: http://www.scons.org/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值