SCons
SConsは、オープンソースのソフトウェアビルドツール。SConsは古典的な make ユーティリティの代替であり、さらにAutotools…
| 作者 | Steven Knight |
|---|---|
| 最新版 |
4.9.0[1]
/ 2025年3月3日 |
| リポジトリ | |
| プログラミング 言語 | Python |
| 対応OS | クロスプラットフォーム |
| 種別 | ソフトウェア開発ツール |
| ライセンス | MITライセンス |
| 公式サイト |
scons |
SConsは、オープンソースのソフトウェアビルドツール。SConsは古典的な make ユーティリティの代替であり、さらにAutotoolsの機能とccacheのようなコンパイラキャッシュ機能を統合している。それまでのツールと比較すると、使いやすく信頼性が高い。
概要
- コンフィギュレーションファイルはPythonのスクリプトになっている。
- C、C++、FORTRAN のファイルの依存関係の自動分析機能が組み込まれている。make のように "make depend" や "make clean"[※ 1] といったコマンドを追加しなくても全ての依存関係を得られる。他の言語やファイルタイプについては、ユーザーが依存関係スキャナを定義することで容易に拡張できる。autotoolsとは異なり、gccに組み込まれている依存関係分析機能は使っていない。代わりに、C/C++ のソースファイルに対しては "#include" をregexpスキャンする。したがってgccを使った場合、依存関係分析が遅くなるし(スキャンを余分に行っているため)、信頼性が低い(例えば、-DSOMETHING といったプリプロセッサ用フラグを無視することになるため)が、gcc以外のコンパイラでも同じ依存関係スキャンを行うという意味では移植性が高くなっている。
- C、C++、D、Java、FORTRAN、Objective-C、Yacc、Lex、Qt、SWIG を元からサポートしており、TeXとLaTeXによる文書作成もサポートしている。他の言語やファイルタイプについてもユーザー定義のビルダーでサポート可能である。
- SCCS、RCS、CVS、Subversion、BitKeeper、Perforce からソースファイルを取り出せる。
- Microsoft Visual Studio .NET および過去の Visual Studio をサポート(.dsp、.dsw、.sln、.vcproj ファイルを生成)
- MD5シグネチャを使ってファイル内容の更新を検出する。一般的なタイムスタンプによる検出もサポートしており、どちらかを選択できる。
- 並列ビルドをサポートしており、ディレクトリ構成とは関係なく指定した個数のジョブを同時に実行できる。
- #include ファイル、ライブラリ、関数、typedef を探すというautoconfのような機能も組み込みでサポート。
- 全依存関係のグローバルビューがあり、複数回のビルドやターゲットの並べ替えが不要。
- 作成したファイルをキャッシュで共有でき、複数回のビルドが高速化できる。ccache に似ているが、C/C++ のコンパイルだけでなく、あらゆるターゲットファイルに対応している。
- クロスプラットフォームのビルド向けに設計されており、Linux、その他のPOSIXシステム(AIX、BSD系、HP-UX、IRIX、Solaris)、Windows NT系、macOS、OS/2 で動作する。
SConstruct ファイルの例
Program('main.c')
ユーザーが 'scons' コマンドを実行すると、'main'(Linux)または 'main.exe'(Windows)という実行ファイルをビルドする。
歴史と関連プロジェクト
元々は ScCons という名称のビルドツールで、2000年8月にロスアラモス国立研究所が開催した Software Carpentry(既存のプログラミングツールを代替するソフトウェアを募集したイベント)のビルド部門で優勝した。元々は Cons[※ 2] というユーティリティをベースとして設計されていた。
Waf(英語版)はかつては "SCons/BKsys" という名称で、SCons に影響を受けてKDEコミュニティが生み出したツールである。KDE4とそれ以降のビルドにこれを使う計画があったが、CMake に移行した[2]。
SConsを使っている主なアプリケーション
- The Battle for Wesnoth[3]
- バトルフィールド1942[要出典]
- Csound[4]
- Doom 3[5]
- FCEUX[要出典]
- gem5[6]
- gpsd[7]
- GtkRadiant[8]
- Madagascar[9]
- Mixxx[10]
- MongoDB[11]
- Nullsoft Scriptable Install System[12]
- NumPy and SciPy[要出典]
- OpenNebula[要出典]
- OSRM[13]
- SuperCollider[要出典]
- VMware[要出典]
- Formerly V8 (JavaScript engine)[14]
- Wolfenstein: Enemy Territory[要出典]
- XORP, MCA2[15]
- Godot[16]
注釈
脚注
- ^ SCons 4.9.0 is available
- ^ Why the KDE project switched to CMake -- and how (continued) LWN.net、
- ^ “CompilingWesnoth”. Wiki. Wesnoth. 2011年4月11日閲覧。
- ^ “Building Csound”. C sounds. 2011年4月11日閲覧。
- ^ “README.txt”. id Software. 2015年5月13日閲覧。
- ^ Gem5.
- ^ “SCons is full of win today”. ESR. iBiblio (2011年4月5日). 2011年4月11日閲覧。
- ^ “Developer documentation for GtkRadiant 1.6.0 (Zeroradiant)” (Trac). QE radiant (2008年6月30日). 2009年12月28日閲覧。
- ^ “Installation”. Wiki. Ahay (2011年2月26日). 2011年4月11日閲覧。
- ^ “Mixxx/Compiling” (2014年8月26日). 2015年7月17日閲覧。
- ^ “Building for Linux”. MongoDB. 10gen (2009年1月30日). 2011年2月8日閲覧。
- ^ “INSTALL”. NSIS. Source forge (2011年5月28日). 2011年4月11日閲覧。
- ^ “Open Source Routing Machine”. 2012年5月29日閲覧。
- ^ “How to Download and Build V8”. V8. Google. 2011年7月5日閲覧。
- ^ “Modular Controller Architecture”. Research Center for Information Technology (FZI), Karlsruhe Institute of Technology (KIT). 2015年7月17日閲覧。
- ^ “Godot Docs ビルドシステムの説明”. 2020年10月16日閲覧。
関連項目
外部リンク
- SCons: A software construction tool - SCons 公式ウェブサイト
- Make Alternatives Freshmeat
- Stop the autoconf insanity! Why we need a new build system. Freshmeat
- Empirical Comparison of SCons and GNU Make, Ludwig Hähne, Technical University Dresden, August 21, 2008
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.