トップ(最新)

nDiki : SCons

SCons

スポンサード リンク

Related term

2005年4月20日 (水)

SConsGNU Autotools のかわりになるか このエントリーを含むはてなブックマーク

NSIS のサイトによるとビルドに「SCons」を使うようしたらしい。

  • クロスプラットフォーム
  • AutoconfAutomake と同様の機能を統合
  • LaTeX もビルトインサポート

と興味深いツールになっているようだ。

現在プロジェクトLaTeXベースのドキュメント生成には GNU Make を使っているのだが、UNIXWindows の両方でビルドできるようにするには ComSpec 環境変数の有無で使用するコマンドを切り換えたり等いろいろ面倒なので、代替ツールとして使えないかなと。

基本的な機能は Make に対する改良がなされているようであるし、コピー等ファイル操作も SCons 自体がもっているのでクロスプラットフォームでビルドできるようにするのも楽そうだ。

一方 Autoconf 系の機能については、インストール済みのライブラリの検出や実装レベルのチェック等を実装しているようである。 make check や make dist、make install 等にあたるターゲットに関する機能(あるいは規約)のようなものは無い。これは非常に残念。 結局自分が Ant を使わなくなったのも GNU Autotools にあるこれらの機能に欠けているからであるし。

実は私がPerl が好きな理由の一つとして、これらサポートが充実しているという点がある。Perl では ExtUtils::MakeMaker (あるいは Module::Build)があり、ビルドからテスト、ソースパッケージのパッケージングまでフレームワークが整っている。

SConsPython ベースで、Makefile にあたるファイルも Python スクリプトである。 SCons が影響を受けた Cons は Perl ベースであったのだが、既に2001年5月ごろから開発が止まってしまっている。残念。

ということで Make の代替には使えそうであるが、GNU Autotools と同じようなことをするにはいろいろ手をかけないといけないといった印象。

スポンサード リンク


[ 4月20日全て ]

2005年4月29日 (金)

SCons 微妙 このエントリーを含むはてなブックマーク

SConspLaTeX2e ソースファイルを PDF に変換する SConstruct ファイルを書いてみた。

 bb_builder = Builder(action = 'ebb $SOURCE',
                      suffix = '.bb', src_suffix = '.png')
 pdf_builder = Builder(action = 'dvipdfmx -V 4 $SOURCE',
                       suffix = 'pdf', src_suffix = '.dvi')
 env = Environment(LATEX = 'platex')
 env.Append(BUILDERS = {'BBBuilder' : bb_builder})
 env.Append(BUILDERS = {'PDFBuilder' : pdf_builder})
 env.PDFBuilder(target = 'example-doc')
 env.DVI(target = 'example-doc', source = 'example-doc.tex')
 env.Clean('example-doc.dvi',
           ['example-doc.log', 'example-doc.out',
            'example-doc.toc', 'example-doc.aux'])
 env.Depends('example-doc.dvi', 'image1.bb')
 env.Depends('example-doc.dvi', 'image2.bb')
 env.Depends('example-doc.dvi', 'image3.bb')
 env.BBBuilder('image1')
 env.BBBuilder('image2')
 env.BBBuilder('image3')
  • 組み込みの PDF builder が今いち挙動がよくわからないので Builder を作成
  • .bb ファイル用の Builder を作成
  • latex ではなく platex を使うように

.tex から .dvi の生成ルールでは、補助ファイルを見て適宜数回 platex を実行してくれる。ここら辺はさすが。

GNU Make のような暗黙のルールの適用がない(わからない)ので、.bb ファイルを dvi の依存ファイルに指定するだけでは駄目で、ビルド指定をする必要があるのがちょっと面倒。

これだけだと GNU Make より便利とはいえないな。 プラットフォームによって異なるコマンド(cp / copy など)を使うような事や、もうちょっと複雑な事などをしないとそれほどメリットがでないか。


[ 4月29日全て ]

Related web page

vimrc diary / 2005-09: sconsの実行ファイル
をインポートした。 pkgsrcの作り方もCVSの使い方もよくわかっていないので、おかしい所も多々あるはず。 とりあえずperlのライブラリのインストール場合がよくわからないので、/usr/pkg/lib/perl5/site_perl/5.8.5/に置いた。 何か間違っている気がする…。 http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/pkgsrc-wip/wip-jp/chalow/ ■ 弁護士がオープンソースに関して知っておくべき10の項目 [etc] そのうち読も
http://vimrc.hp.infoseek.co.jp/diary/2005-09.html#2005-09-14
SconsVsOtherBuildTools - SCons Wiki
. Also known as BJam, it supports language extensions -- such as modules and classes -- that are required to actually put together a build system of any sophistication. See Boost Build V2. Jam is similar to Make in that it is based on dependency triggered execution of commands. It comes with a very small, but extensible, set of functions ("rules") that make "building simple things simple and building complicated things manageable." That's true up to the point that you need to do some very simple things port
http://www.scons.org/cgi-bin/wiki/SconsVsOtherBuildTools
なんとなく(2004-05-21)
SCons について
http://air.zive.net/d/20040521.html
SCons: A software construction tool
<strong>SCons</strong> 0.96.90 contains a lot of features, bug fixes, and some greatly-anticipated improvements in performance and memory consumption. Because there have been a number of extensive changes to internal subsystems, this testing pre-release is intended to try to catch any last crucial bugs before releasing it officially as 0.97 (to be released soon, we hope). You can download it directly from the download page at SourceForge. See the Relase Notes for a description of how you can help test this release and an o
http://www.scons.org/

■よく検索されるキーワード

torrent(174) expressions(80) 竹内まりや(62) ドラマ(27) x31(25) linux(24) windows(23) 壁紙(22) 動画(21) 手帳(21) wiki(20) perl(20) 画像(19) debian(19) 蘇える金狼(18) 吉瀬美智子(18) mp3(16) 使い方(15) 秋葉原(14) thinkpad(14) ダウンロード(14) usb(14) 竹内まりあ(13) バッグ(13) ヨドバシカメラ(12) リフィル(12) ubuntu(12) ノート(11) xp(11) ヨドバシ(11) 作り方(11) skype(10) so905ics(10) nikon(10) ほぼ日手帳(10) porter(10) 無印(9) cvs(9) サンプル(9) 生年月日(9) a6(9) ヤマダ電機(9) 評判(9) 写真(9) firefox(8) 書き方(8) 方眼(8) .torrent(8) 万年筆(8) 日本語(8) apache(8) tc-1(8) 無料動画(8) 冷蔵庫(8) 設定(8) 修理(8) 今村恵子(8) インストール(7) ダイソー(7) 無料(7) 無印良品(7) ほぼ日(7) nikkor(7) dvd(7) システム手帳(7) 水谷ケイ(6) cgi(6) c#(6) うなぎ(6) スーパー(6) hdd(6) 変換(6) ssh(6) vq1005(6) 2009(6) 風邪(6) centos(6) 機内持ち込み(6) 2008(6) 比較(6)

この日記のはてなブックマーク数 Add to Google RSS

Process Time: 0.11382s / load averages: 0.20, 0.26, 0.32
nDiki by WATANABE Yoshimasa (profile)
Powered by DiKicker
Base theme by Nana (for tDiary)