Software:SCons
Original author(s) | Steven Knight |
---|---|
Stable release | 4.4.0[1]
/ July 31, 2022 |
Repository | github |
Written in | Python |
Operating system | Cross-platform |
Type | Software development tools |
License | MIT License |
Website | scons |
SCons is a computer software build 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.
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]
Notable applications that use SCons include the following: The Battle for Wesnoth,[5] Battlefield 1942,[citation needed] Doom 3,[6] FCEUX,[7] gem5,[8] gpsd,[9] GtkRadiant,[10] Madagascar,[11] Mixxx,[12] MongoDB,[13] Nullsoft Scriptable Install System,[14] OpenNebula,[15] VMware,[citation needed], Wolfenstein,[16] XORP and MCA2,[17] openpilot[18] and Godot.[19]
.csig is the SCons Content Signature file format.
Major features
Major SCons features include the following:
- 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. SCons can also handle other languages or file types through user-defined builders.
- Building from central repositories of source code and pre-built targets.
- Built-in ability to use Microsoft Visual Studio, including the generation of .dsp, .dsw, .sln and .vcproj files.
- Detection of file content changes using MD5 signatures; optional, configurable ability to use traditional timestamps.
- Ability to do parallel builds, maintaining 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 Linux, IBM AIX and OS/2, *BSD Unices, HP-UX, SGI IRIX, Solaris, illumos), MS Windows NT, Apple OS X.
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"])
See also
- Buildout
- CMake
- qmake
- Qbs (build tool)
- Premake
- GNU build system
- List of build automation software
- Waf
References
- ↑ "Archives - SCons". https://scons.org/archives.html.
- ↑ Cons, DSMit, http://www.dsmit.com/cons/.
- ↑ Samuel, Alex (2000-08-04). "Software Carpentry Design Competition Second Round Results Config, Build, and Track categories". https://lwn.net/2000/0810/a/sc-second-round.php3.
- ↑ Neundorf, Alexander (21 June 2006). "Why the KDE project switched to CMake – and how (continued)". LWN. https://lwn.net/Articles/188693/.
- ↑ "CompilingWesnoth". Wiki. Wesnoth. http://wiki.wesnoth.org/CompilingWesnoth#Building_with_SCons.
- ↑ "README.txt". id Software. https://github.com/id-Software/DOOM-3/blob/master/README.txt.
- ↑ "Downloads". FCEUX. http://www.fceux.com/web/download.html.
- ↑ Gem5, http://www.gem5.org/.
- ↑ "SCons is full of win today". ESR. iBiblio. 2011-04-05. http://esr.ibiblio.org/?p=3089.
- ↑ "Developer documentation for GtkRadiant 1.6.0 (Zeroradiant)" (Trac). QE radiant. 2008-06-30. http://www.qeradiant.com/cgi-bin/trac.cgi/browser/GtkRadiant/trunk/COMPILING.
- ↑ "Installation". Wiki. Ahay. 2011-02-26. http://www.ahay.org/wiki/Installation#Installation_from_source.
- ↑ "Mixxx/Compiling". 2014-08-26. https://github.com/mixxxdj/mixxx#compiling.
- ↑ "Building for Linux". MongoDB. 10gen. January 30, 2009. http://www.mongodb.org/display/DOCS/Building+for+Linux#BuildingforLinux-Building.
- ↑ "INSTALL". NSIS. Source forge. 2011-05-28. http://nsis.svn.sourceforge.net/viewvc/nsis/NSIS/trunk/INSTALL?revision=6147&view=markup.
- ↑ "/SConstruct - OpenNebula - OpenNebula Development pages". OpenNebula Project. http://dev.opennebula.org/projects/opennebula/repository/revisions/e20fb5c4c42960186cae7cdf353ba96e7a629703/entry/SConstruct.
- ↑ "README.txt". id Software. https://github.com/id-Software/Enemy-Territory/blob/master/README.txt.
- ↑ "Modular Controller Architecture". Research Center for Information Technology (FZI), Karlsruhe Institute of Technology (KIT). http://mca2.org/.
- ↑ "openpilot Github repository". https://github.com/commaai/openpilot.
- ↑ "Introduction to the buildsystem — Godot Engine latest documentation". https://docs.godotengine.org/en/3.1/development/compiling/introduction_to_the_buildsystem.html.
External links
Original source: https://en.wikipedia.org/wiki/SCons.
Read more |