SCons

Last updated
SCons
Original author(s) Steven Knight
Initial releaseDecember 13, 2001;23 years ago (2001-12-13) [1]
Stable release
4.8.1 [2] / September 4, 2024;3 months ago (2024-09-04)
Repository github.com/SCons/scons
Written in Python
Operating system Cross-platform
Type Software development tools
License MIT License
Website 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.

Contents

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. [3] 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 projects that use SCons (or used it at one time) include: The Battle for Wesnoth, [6] Battlefield 1942,[ citation needed ] 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,[ citation needed ], Wolfenstein: Enemy Territory, [17] XORP and MCA2, [18] openpilot [19] and Godot. [20]

.csig is the SCons Content Signature file format.

Features

Major features include:

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

Related Research Articles

GNU Autoconf is a software development tool for generating a configure script that in turn generates files for building a codebase and for packaging or installing the resulting files. Autoconf is part of the GNU Build System – along with Automake, Libtool, Autoheader and other tools.

<span class="mw-page-title-main">GNU Autotools</span> Software build toolset from GNU

The GNU Autotools, also known as the GNU Build System, is a suite of build automation tools designed to support building source code and packaging the resulting binaries. It supports building a codebase for multiple target systems without customizing or modifying the code. It is available on many Linux distributions and Unix-like environments.

In software development, Make is a command-line interface software tool that performs actions ordered by configured dependencies as defined in a configuration file called a makefile. It is commonly used for build automation to build executable code from source code. But, not limited to building, Make can perform any operation available via the operating system shell.

<span class="mw-page-title-main">APT (software)</span> Free software package management system

Advanced package tool, or APT, is a free-software user interface that works with core libraries to handle the installation and removal of software on Debian and Debian-based Linux distributions. APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages, either from precompiled files or by compiling source code.

<span class="mw-page-title-main">KDevelop</span> Integrated development environment

KDevelop is a free and open-source integrated development environment (IDE) for Unix-like computer operating systems and Windows. It provides editing, navigation and debugging features for several programming languages, and integration with build automation and version-control systems, using a plugin-based architecture.

wxWidgets Widget toolkit

wxWidgets is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with no significant code changes. A wide choice of compilers and other tools to use with wxWidgets facilitates development of sophisticated applications. wxWidgets supports a comprehensive range of popular operating systems and graphical libraries, both proprietary and free.

<span class="mw-page-title-main">Apache Ant</span> Java build tool

Apache Ant is a software tool for automating software build processes for Java applications which originated from the Apache Tomcat project in early 2000 as a replacement for the Make build tool of Unix. It is similar to Make, but is implemented using the Java language and requires the Java platform. Unlike Make, which uses the Makefile format, Ant uses XML to describe the code build process and its dependencies.

<span class="mw-page-title-main">Fox toolkit</span>

The FOX toolkit is an open-source, cross-platform widget toolkit, i.e. a library of basic elements for building a graphical user interface (GUI). FOX stands for Free Objects for X.

A software build is the process of converting source code files into standalone software artifact(s) that can be run on a computer, or the result of doing so.

<span class="mw-page-title-main">CMake</span> Cross-platform build tool for configuring platform-specific builds

CMake is a free, cross-platform, software development tool for building applications via compiler-independent instructions. It also can automate testing, packaging and installation. It runs on a variety of platforms and supports many programming languages.

<span class="mw-page-title-main">Waf (build system)</span>

Waf is a build automation tool designed to assist in the automatic compilation and installation of computer software. It is written in Python and maintained by Thomas Nagy.

Qbs is a cross-platform free and open-source software for managing the build process of software. It was designed to support large, complex projects, written in any number of programming languages, primarily C/C++.

BitBake is a make-like build tool with the special focus of distributions and packages for embedded Linux cross compilation, although it is not limited to that. It is inspired by Portage, which is the package management system used by the Gentoo Linux distribution. BitBake existed for some time in the OpenEmbedded project until it was separated out into a standalone, maintained, distribution-independent tool. BitBake is co-maintained by the Yocto Project and the OpenEmbedded project.

Olex and Olex2 are versatile software for crystallographic research. Olex used to be a research project developed during PhD to implement topological analysis of polymeric chemical structures and still is widely used around the world. Olex2 is an open source project with the C++ code portable to Windows, Mac and Linux. Although the projects share the common name they are not related at the source code level.

GYP is an obsolete build automation tool created in 2011 by Google. Its purpose was to generate native IDE project files for building the Chromium web browser and is licensed as open source software using the BSD software license.

<span class="mw-page-title-main">Meson (software)</span> Build automation tool

Meson is a software build automation tool for building a codebase. Meson adopts a convention over configuration approach to minimize the data required to configure the most common operations. Meson is free and open-source software under the Apache License 2.0.

<span class="mw-page-title-main">KDE Projects</span>

KDE Projects are projects maintained by the KDE community, a group of people developing and advocating free software for everyday use, for example KDE Plasma and KDE Frameworks or applications such as Amarok, Krita or Digikam. There are also non-coding projects like designing the Breeze desktop theme and iconset, which is coordinated by KDE's Visual Design Group. Even non-Qt applications like GCompris, which started as a GTK-based application, or web-based projects like WikiToLearn are officially part of KDE.

<span class="mw-page-title-main">Mix (build tool)</span> Build automation software for Elixir

Mix is a build automation tool for working with applications written in the Elixir programming language. Mix was created in 2012 by Anthony Grimes, who took inspiration from Clojure's Leiningen. Soon after, Mix was merged into the Elixir programming language itself and to this day is one of the six applications that are part of the Elixir language. Mix provides functionality for creating, compiling, and testing Elixir source code and for managing dependencies and deploying Elixir applications.

References

  1. Knight, Steven (February 2002). "SCons Design and Implementation". Archived from the original on March 21, 2018. Retrieved March 23, 2024.
  2. "Archives - SCons".
  3. Cons (web site), DSMit, archived from the original on 2000-08-15.
  4. Samuel, Alex (2000-08-04). "Software Carpentry Design Competition Second Round Results Config, Build, and Track categories" . Retrieved 2012-10-29.
  5. Neundorf, Alexander (21 June 2006). "Why the KDE project switched to CMake – and how (continued)". LWN. Retrieved 21 July 2009.
  6. "CompilingWesnoth". Wiki. Wesnoth. Retrieved 2011-04-11.
  7. "README.txt". id Software. Retrieved 2015-05-13.
  8. "Downloads". FCEUX. Retrieved 2017-04-25.
  9. Gem5 .
  10. "SCons is full of win today". ESR. iBiblio. 2011-04-05. Retrieved 2011-04-11.
  11. "Developer documentation for GtkRadiant 1.6.0 (Zeroradiant)" (Trac). QE radiant. 2008-06-30. Retrieved 2009-12-28.
  12. "Installation". Wiki. Ahay. 2011-02-26. Retrieved 2011-04-11.
  13. "Mixxx/Compiling". GitHub . 2014-08-26.
  14. "Building for Linux". MongoDB. 10gen. January 30, 2009. Archived from the original on February 21, 2009. Retrieved February 8, 2011.
  15. "INSTALL". NSIS (source code). Source forge. 2011-05-28. Archived from the original on 2012-07-11. Retrieved 2011-04-11.
  16. "/SConstruct - OpenNebula - OpenNebula Development pages". OpenNebula Project. Retrieved 2016-01-09.
  17. "README.txt". id Software. Retrieved 2017-04-25.
  18. "Modular Controller Architecture". Research Center for Information Technology (FZI), Karlsruhe Institute of Technology (KIT).
  19. "openpilot Github repository". comma.ai/. Retrieved 2021-05-10.
  20. "Introduction to the buildsystem — Godot Engine latest documentation". docs.godotengine.org. Retrieved 2019-08-19.