Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
SCons
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Redirect-distinguish|Scons|Scones}} {{Infobox software | name = SCons | logo = SCons.png | screenshot = <!-- [[File: ]] --> | caption = | collapsible = | author = Steven Knight | developer = | released = {{start date and age|2001|12|13}}<ref>{{cite web |url=http://legacy.python.org/workshops/2002-02/papers/16/index.htm|first=Steven|last=Knight|date=February 2002|title = SCons Design and Implementation|access-date=March 23, 2024|url-status=live|archive-url=https://web.archive.org/web/20180321082341/http://legacy.python.org/workshops/2002-02/papers/16/index.htm|archive-date=March 21, 2018}}</ref> | discontinued = | latest release version = 4.8.1<ref>{{cite web |url=https://scons.org/archives.html |title = Archives - SCons}}</ref> | latest release date = {{start date and age|2024|09|04}} | latest preview version = | latest preview date = <!-- {{start date and age|YYYY|MM|DD}} --> | repo = {{URL|https://github.com/SCons/scons}} | programming language = [[Python (programming language)|Python]] | operating system = [[Cross-platform]] | platform = | size = | language = | genre = [[Software development tools]] | license = [[MIT License]] | website = {{URL|http://scons.org}} }} '''SCons''' is a [[software development tool]] that analyzes [[source code]] 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 similar to the more popular [[GNU build system]]. The tool generates [[Python (programming language)|Python]] scripts for project configuration and build logic. == History == The ''Cons'' software construction utility, written in the [[Perl]], was created by Bob Sidebotham in 1999.<ref>{{Citation | url = http://www.dsmit.com/cons/ | title = Cons | type = web site | publisher = DSMit | url-status = dead | archive-url = https://archive.today/20000815211359/http://www.dsmit.com/cons/ | archive-date = 2000-08-15 }}.</ref> It served as a base for the ''ScCons'' build tool, a design which won the [[Software Carpentry]] project SC Build competition in August 2000.<ref>{{cite web| url = https://lwn.net/2000/0810/a/sc-second-round.php3 |title= Software Carpentry Design Competition Second Round Results Config, Build, and Track categories|date=2000-08-04|first=Alex|last= Samuel|access-date= 2012-10-29}}</ref> ScCons was the foundation for SCons. SCons inspired the creation of [[Waf (build system)|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]].<ref>{{cite web|url=https://lwn.net/Articles/188693/|title=Why the KDE project switched to CMake β and how (continued)|last=Neundorf|first=Alexander|date=21 June 2006|publisher=LWN | access-date =21 July 2009}}</ref> Notable projects that use SCons (or used it at one time) include: [[The Battle for Wesnoth]],<ref>{{cite web| url = http://wiki.wesnoth.org/CompilingWesnoth#Building_with_SCons | title =CompilingWesnoth|access-date= 2011-04-11 | work = Wiki | publisher = Wesnoth}}</ref> [[Battlefield 1942]],{{citation needed|date=March 2014}} [[Doom 3]],<ref>{{cite web|url=https://github.com/id-Software/DOOM-3/blob/master/README.txt | publisher = id Software | title=README.txt | access-date= 2015-05-13}}</ref> [[FCEUX]],<ref>{{cite web|url = http://www.fceux.com/web/download.html | publisher = FCEUX | title = Downloads | access-date = 2017-04-25}}</ref> gem5,<ref>{{Citation | url = http://www.gem5.org/ | title = Gem5}}.</ref> [[gpsd]],<ref>{{cite web|url= http://esr.ibiblio.org/?p=3089| work = ESR | publisher = iBiblio | title= SCons is full of win today|date = 2011-04-05 | access-date=2011-04-11}}</ref> [[GtkRadiant]],<ref>{{cite web| publisher = QE radiant | url= http://www.qeradiant.com/cgi-bin/trac.cgi/browser/GtkRadiant/trunk/COMPILING |title=Developer documentation for GtkRadiant 1.6.0 (Zeroradiant)| date= 2008-06-30 | format = Trac | access-date = 2009-12-28}}</ref> [[Madagascar (software)|Madagascar]],<ref>{{cite web | publisher = Ahay | work = Wiki | url= http://www.ahay.org/wiki/Installation#Installation_from_source |title= Installation|date = 2011-02-26 | access-date = 2011-04-11}}</ref> [[Mixxx]],<ref>{{cite web|url=https://github.com/mixxxdj/mixxx#compiling | title=Mixxx/Compiling | website=[[GitHub]] | date=2014-08-26}}</ref> [[MongoDB]],<ref>{{cite web|url= http://www.mongodb.org/display/DOCS/Building+for+Linux#BuildingforLinux-Building|archive-url= https://web.archive.org/web/20090221220848/http://www.mongodb.org/display/DOCS/Building+for+Linux#BuildingforLinux-Building|url-status= dead|archive-date= February 21, 2009|work= MongoDB|title= Building for Linux|date= January 30, 2009|publisher= 10gen|access-date= February 8, 2011}}</ref> [[Nullsoft Scriptable Install System]],<ref>{{cite web | url = http://nsis.svn.sourceforge.net/viewvc/nsis/NSIS/trunk/INSTALL?revision=6147&view=markup | archive-url = https://archive.today/20120711221146/http://nsis.svn.sourceforge.net/viewvc/nsis/NSIS/trunk/INSTALL?revision=6147&view=markup | url-status = dead | archive-date = 2012-07-11 | title = INSTALL | work = NSIS | type = source code | date = 2011-05-28 | access-date = 2011-04-11 | publisher = Source forge }}</ref> [[OpenNebula]],<ref>{{cite web | url = http://dev.opennebula.org/projects/opennebula/repository/revisions/e20fb5c4c42960186cae7cdf353ba96e7a629703/entry/SConstruct | title = /SConstruct - OpenNebula - OpenNebula Development pages | publisher = OpenNebula Project | access-date= 2016-01-09}}</ref> [[VMware]],{{citation needed|date=March 2014}}, [[Wolfenstein: Enemy Territory]],<ref>{{cite web|url = https://github.com/id-Software/Enemy-Territory/blob/master/README.txt | publisher = id Software | title = README.txt | access-date = 2017-04-25}}</ref> [[XORP]] and MCA2,<ref>{{cite web|url= http://mca2.org/ |title= Modular Controller Architecture|publisher = Research Center for Information Technology (FZI), Karlsruhe Institute of Technology (KIT)}}</ref> [[openpilot]]<ref>{{Cite web|url=https://github.com/commaai/openpilot|title=openpilot Github repository|website=comma.ai/|access-date=2021-05-10}}</ref> and [[Godot (game engine)|Godot]].<ref>{{Cite web|url=https://docs.godotengine.org/en/3.1/development/compiling/introduction_to_the_buildsystem.html|title=Introduction to the buildsystem β Godot Engine latest documentation|website=docs.godotengine.org|access-date=2019-08-19}}</ref> .csig is the SCons Content Signature file format. == Features == Major features include: * Configuration files are Python; user-written builds can leverage a general-purpose, cross-platform programming language * [[coupling (computer programming)|Dependency]] analysis for [[C (programming language)|C]], [[C++]] and [[Fortran]] * Dependency analysis is extensible through user-defined scanners for other languages or file types; unlike [[GNU Compiler Collection]] (GCC) dependency analysis, SCons uses a [[regular expression]] scan for included source files * Built-in support for C, C++, [[D (programming language)|D]], [[Java (programming language)|Java]], [[Fortran]], [[Objective-C]], [[Yacc]], [[Lex (software)|Lex]], [[Qt (framework)|Qt]] and [[SWIG]], as well as [[TeX]] and [[LaTeX]] documents * Support for other languages via custom builders * Building from central repositories of source code and pre-built targets * Ability to use [[Microsoft Visual Studio|Visual Studio]], including the generation of {{Not a typo|.dsp}}, {{Not a typo|.dsw}}, {{Not a typo|.sln}} and {{Not a typo|.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 * Autoconf-like support for finding #include files, libraries, functions and [[typedef]]s * Global view of 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; known to work on [[POSIX]] systems (including [[Linux]], [[IBM AIX|AIX]] and [[OS/2]], [[Berkeley Software Distribution|*BSD Unices]], [[HP-UX]], [[Silicon Graphics|SGI]] [[IRIX]], [[Solaris (operating system)|Solaris]], [[illumos]]), [[Windows NT]], [[OS X]] == Examples == The following is an SConstruct file that builds a [[hello world]] C program using the default platform compiler: <syntaxhighlight lang="python"> Program("hello-world.c") </syntaxhighlight> The following is a SConstruct file for a project that includes two source files and specifies build tool options: <syntaxhighlight lang="python"> env = Environment() env.Append(CPPFLAGS=["-Wall", "-g"]) env.Program("hello", ["hello.c", "main.c"]) </syntaxhighlight> == See also == {{Portal|Free and open-source software}} * {{Annotated link|Buildout}} * {{Annotated link|qmake}} * {{Annotated link|Qbs (build tool)}} * {{Annotated link|Premake}} * {{Annotated link|List of build automation software}} == References == {{Reflist|30em}} == External links == * {{Official website|www.scons.org}} {{DEFAULTSORT:Scons}} [[Category:Articles with example Python (programming language) code]] [[Category:Build automation]] [[Category:Compiling tools]] [[Category:Free software programmed in Python]] [[Category:Software using the MIT license]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Annotated link
(
edit
)
Template:Citation
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite web
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Main other
(
edit
)
Template:Not a typo
(
edit
)
Template:Official website
(
edit
)
Template:Portal
(
edit
)
Template:Redirect-distinguish
(
edit
)
Template:Reflist
(
edit
)
Template:Template other
(
edit
)