SCons

Last updated
SCons
Original author(s) Steven Knight
Initial releaseDecember 13, 2001;22 years ago (2001-12-13) [1]
Stable release
4.7.0 [2] / March 17, 2024;7 days ago (2024-03-17)
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 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.

Contents

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. [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,[ 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.

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

See also

Related Research Articles

GNU Autoconf is a tool for producing configure scripts for building, installing, and packaging software on computer systems where a Bourne shell is available.

<span class="mw-page-title-main">GNU Autotools</span> Suite of programming tools

The GNU Autotools, also known as the GNU Build System, is a suite of programming tools designed to assist in making source code packages portable to many Unix-like systems.

<span class="mw-page-title-main">GNU Libtool</span> Software development tool

In computer programming, GNU Libtool is a software development tool, part of the GNU build system, consisting of a shell script created to address the software portability problem when compiling shared libraries from source code. It hides the differences between computing platforms for the commands which compile shared libraries. It provides a command-line interface that is identical across platforms and it executes the platform's native commands.

In software development, Make is a build automation tool that builds executable programs and libraries from source code by reading files called makefiles which specify how to derive the target program. Though integrated development environments and language-specific compiler features can also be used to manage a build process, Make remains widely used, especially in Unix and Unix-like operating systems.

<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.

<span class="mw-page-title-main">Automake</span> Programming tool to automate parts of the compilation process

In software development, GNU Automake is a programming tool to automate parts of the compilation process. It eases usual compilation problems. For example, it points to needed dependencies.

pkg-config is a computer program that defines and supports a unified interface for querying installed libraries for the purpose of compiling software that depends on them. It allows programmers and installation scripts to work without explicit knowledge of detailed library path information. pkg-config was originally designed for Linux, but it is now also available for BSD, Microsoft Windows, macOS, and Solaris.

<span class="mw-page-title-main">GParted</span> Partition editor

GParted is a GTK front-end to GNU Parted and an official GNOME partition-editing application. GParted is used for creating, deleting, resizing, moving, checking, and copying disk partitions and their file systems. This is useful for creating space for new operating systems, reorganizing disk usage, copying data residing on hard disks, and mirroring one partition with another. It can also be used to format a USB drive.

<span class="mw-page-title-main">CMake</span> Cross-platform, compiler-independent build system generator

In software development, CMake is cross-platform free and open-source software for build automation, testing, packaging and installation of software by using a compiler-independent method. CMake is not a build system itself; it generates another system's build files. It supports directory hierarchies and applications that depend on multiple libraries. It can invoke native build environments such as Make, Qt Creator, Ninja, Android Studio, Apple's Xcode, and Microsoft Visual Studio. It has minimal dependencies, requiring only a C++ compiler on its own build system.

<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.

configure script Executable script used when building programs

A configure script is an executable script designed to aid in developing a program to be run on a wide number of different computers. It matches the libraries on the user's computer, with those required by the program before compiling it from its source code.

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++.

<span class="mw-page-title-main">Chakra (operating system)</span> Linux distribution

Chakra was a Linux distribution originally based on Arch Linux and focused on KDE software, intending to provide a KDE/Qt minimizing use of other widget toolkits where possible. It was well received by critics during its existence.

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">GNU Guix</span> Purely functional package manager for the GNU system

GNU Guix is a functional cross-platform package manager and a tool to instantiate and manage Unix-like operating systems, based on the Nix package manager. Configuration and package recipes are written in Guile Scheme. GNU Guix is the default package manager of the GNU Guix System distribution.

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

Meson is a software tool for automating the building (compiling) of software. Meson is free and open-source software written in Python, 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.

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.