SCons: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Frap
 
FCEUX isn't using SCons anymore, https://github.com/TASEmulators/fceux/blob/master/README
 
Line 33: Line 33:
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>
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>
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> 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> [[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.
.csig is the SCons Content Signature file format.

Latest revision as of 06:55, 23 June 2025

Template:Redirect-distinguish Script error: No such module "Infobox".Template:Template otherScript error: No such module "Check for unknown parameters".Template:Main other 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 scripts for project configuration and build logic.

History

The Cons software construction utility, written in the Perl, was created by Bob Sidebotham in 1999.[1] It served as a base for the ScCons build tool, a design which won the Software Carpentry project SC Build competition in August 2000.[2] 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.[3]

Notable projects that use SCons (or used it at one time) include: The Battle for Wesnoth,[4] Battlefield 1942,Script error: No such module "Unsubst". Doom 3,[5] gem5,[6] gpsd,[7] GtkRadiant,[8] Madagascar,[9] Nullsoft Scriptable Install System,[10] OpenNebula,[11] VMware,Script error: No such module "Unsubst"., Wolfenstein: Enemy Territory,[12] XORP and MCA2,[13] openpilot[14] and Godot.[15]

.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
  • Dependency analysis for 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, Java, Fortran, Objective-C, Yacc, Lex, 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 Visual Studio, including the generation of Template:Not a typo, Template:Not a typo, Template:Not a typo and Template:Not a typo 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 typedefs
  • 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, AIX and OS/2, *BSD Unices, HP-UX, SGI IRIX, 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:

Program("hello-world.c")

The following is a SConstruct file for a project that includes two source files and specifies build tool options:

env = Environment()
env.Append(CPPFLAGS=["-Wall", "-g"])
env.Program("hello", ["hello.c", "main.c"])

See also

Script error: No such module "Portal".

References

Template:Reflist

External links

  1. Script error: No such module "citation/CS1"..
  2. Script error: No such module "citation/CS1".
  3. Script error: No such module "citation/CS1".
  4. Script error: No such module "citation/CS1".
  5. Script error: No such module "citation/CS1".
  6. Script error: No such module "citation/CS1"..
  7. Script error: No such module "citation/CS1".
  8. Script error: No such module "citation/CS1".
  9. Script error: No such module "citation/CS1".
  10. Script error: No such module "citation/CS1".
  11. Script error: No such module "citation/CS1".
  12. Script error: No such module "citation/CS1".
  13. Script error: No such module "citation/CS1".
  14. Script error: No such module "citation/CS1".
  15. Script error: No such module "citation/CS1".