SCons explained

SCons
Author:Steven Knight
Released:[1]
Latest Release Version:4.7.0[2]
Programming Language:Python
Operating System:Cross-platform
Genre:Software development tools
License:MIT License

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.

History and related projects

SCons software history started with the Cons software construction utility created by Bob Sidebotham in 1999.[3] 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.[4] 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.[5]

Notable applications that use SCons include the following: The Battle for Wesnoth,[6] Battlefield 1942, Doom 3,[7] FCEUX,[8] gem5,[9] gpsd,[10] GtkRadiant,[11] Madagascar,[12] Mixxx,[13] MongoDB,[14] Nullsoft Scriptable Install System,[15] OpenNebula,[16] VMware,,,[17] XORP and MCA2,[18] openpilot[19] and Godot.[20]

.csig is the SCons Content Signature file format.

Major features

Major SCons features include the following:

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 = Environmentenv.Append(CPPFLAGS=["-Wall", "-g"])env.Program("hello", ["hello.c", "main.c"])

See also

Notes and References

  1. Web site: SCons Design and Implementation. Steven. Knight. February 2002. March 23, 2024. live. https://web.archive.org/web/20180321082341/http://legacy.python.org/workshops/2002-02/papers/16/index.htm. March 21, 2018.
  2. Web site: Archives - SCons.
  3. .
  4. Web site: Software Carpentry Design Competition Second Round Results Config, Build, and Track categories. 2000-08-04. Alex. Samuel. 2012-10-29.
  5. Web site: Why the KDE project switched to CMake – and how (continued). Neundorf. Alexander. 21 June 2006. LWN . 21 July 2009.
  6. Web site: CompilingWesnoth. 2011-04-11 . Wiki . Wesnoth.
  7. Web site: README.txt . id Software . 2015-05-13.
  8. Web site: Downloads . FCEUX . 2017-04-25.
  9. .
  10. Web site: SCons is full of win today. ESR . iBiblio . 2011-04-05 . 2011-04-11.
  11. Web site: QE radiant . Developer documentation for GtkRadiant 1.6.0 (Zeroradiant). 2008-06-30 . Trac . 2009-12-28.
  12. Web site: Ahay . Wiki . Installation. 2011-02-26 . 2011-04-11.
  13. Web site: Mixxx/Compiling . . 2014-08-26.
  14. Web site: Building for Linux. https://web.archive.org/web/20090221220848/http://www.mongodb.org/display/DOCS/Building+for+Linux#BuildingforLinux-Building. dead. February 21, 2009. MongoDB. January 30, 2009. 10gen. February 8, 2011.
  15. Web site: INSTALL . https://archive.today/20120711221146/http://nsis.svn.sourceforge.net/viewvc/nsis/NSIS/trunk/INSTALL?revision=6147&view=markup . dead . 2012-07-11 . NSIS . source code . 2011-05-28 . 2011-04-11 . Source forge .
  16. Web site: /SConstruct - OpenNebula - OpenNebula Development pages . OpenNebula Project . 2016-01-09.
  17. Web site: README.txt . id Software . 2017-04-25.
  18. Web site: Modular Controller Architecture. Research Center for Information Technology (FZI), Karlsruhe Institute of Technology (KIT).
  19. Web site: openpilot Github repository. comma.ai/. 2021-05-10.
  20. Web site: Introduction to the buildsystem — Godot Engine latest documentation. docs.godotengine.org. 2019-08-19.