SCons
Original author(s) | Steven Knight |
---|---|
Stable release | 2.3.6[1] / July 31, 2015 |
Written in | Python |
Operating system | Cross-platform |
Type | Software development tools |
License | MIT License |
Website | scons |
SCons is a computer software construction tool that automatically analyzes source code file dependencies and operating system adaptation requirements from a software project description and generates final binary executables for installation on the target operating system platform. Its function is analogous to the traditional GNU build system based on the make utility and the autoconf tools.
SCons generates project configurations and build process implementations in the form of Python scripts.
Contents
Major features
- Configuration files are Python scripts, which means that user-written builds have access to a complete general-purpose programming language.
- Automatic dependency analysis built-in for C, C++ and Fortran. Dependency analysis is extensible through user-defined dependency scanners for other languages or file types. Unlike the GNU Compiler Collection's (GCC) built-in dependency analysis, it uses a regular expression scan for included source files.
- Built-in support for C, C++, D, Java, Fortran, Objective-C, Yacc, Lex, Qt and SWIG, as well as TeX and LaTeX documents. Other languages or file types can be supported through user-defined Builders.
- Building from central repositories of source code and pre-built targets.
- Built-in support for fetching source files from revision control systems, such as SCCS, RCS, CVS, Subversion, BitKeeper and Perforce.
- Built-in support for Microsoft Visual Studio, including generation of .dsp, .dsw, .sln and .vcproj files.
- Detection of file content changes using MD5 signatures; optional, configurable support for traditional timestamps.
- Support for parallel builds which maintains a specified number of jobs running simultaneously regardless of directory hierarchy.
- Integrated Autoconf-like support for finding #include files, libraries, functions and typedefs.
- Global view of all dependencies, so multiple build passes or reordering targets is not required.
- 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 POSIX systems (including GNU/Linux, IBM AIX and OS/2, *BSD Unices, HP-UX, SGI IRIX, Solaris), MS Windows NT, Apple OS X.
SCons software history started with the Cons software construction utility created by Bob Sidebotham in 1999.[2] Cons was written in the Perl language. It served as a base for the ScCons build tool, a design which won the Software Carpentry project SC Build competition in August 2000.[3] ScCons was the foundation for SCons.
SCons inspired the creation of Waf, formerly known as SCons/BKsys, which emerged in the KDE community. For some time, there were plans to use it as the build tool for KDE 4 and beyond, but that effort was abandoned in favor of CMake.[4]
Examples
The following example is a very simple SConstruct file that compiles the C program file hello-world.c using the default platform compiler:
Program('hello-world.c')
The following is a more complex example that creates an environment used to build the program hello:
env = Environment()
env.Append(CPPFLAGS=['-Wall','-g'])
env.Program('hello',
['hello.c', 'main.c'])
Notable applications using SCons
<templatestyles src="Div col/styles.css"/>
- The Battle for Wesnoth[5]
- Battlefield 1942[citation needed]
- Doom 3[6]
- FCEUX[citation needed]
- gem5[7]
- gpsd[8]
- GtkRadiant[9]
- Madagascar[10]
- Mixxx[11]
- MongoDB[12]
- Nullsoft Scriptable Install System[13]
- NumPy and SciPy[citation needed]
- OpenNebula[14]
- OSRM[15]
- SuperCollider[citation needed]
- VMware[citation needed]
- Formerly V8 (JavaScript engine)[16]
- Wolfenstein: Enemy Territory[citation needed]
- XORP, MCA2[17]
- GGT[18]
See also
References
- ↑ http://www.scons.org/CHANGES.txt
- ↑ Lua error in package.lua at line 80: module 'strict' not found..
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found..
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
External links
- Official website
- Lua error in package.lua at line 80: module 'strict' not found.
- Lua error in package.lua at line 80: module 'strict' not found..
- Pages with syntax highlighting errors
- Pages using div col with unknown parameters
- Articles with unsourced statements from March 2014
- Articles with unsourced statements from September 2014
- Articles with unsourced statements from April 2010
- Official website not in Wikidata
- Compiling tools
- Build automation
- Free software programmed in Python
- Software using the MIT license