arc - the arc build tool project
http://www.eyestep.org/arc.html
via: c.l.s
Scheme で autoconf, automake, libtool, make の代替になるツールを作成するプロジェクト。
INSTALL によれば、scm, guile 1.3以降, または ksi で動作とのこと。 自前のインタプリタ asc もあるらしい。
せっかくなので、--scheme=asc で configure してみる。
で、ビルドなのだが、configure が OS の判定しているので OpenBSD だとこける、ので、 FreeBSD のマネをしてみる。 あとは strcat, strcpy がアレなので細々と訂正(arc-20050425.diff) 。てか、今気づいたけど、$HOME あふれ攻撃できるな。これ。
とりあえずインストールまではこれでオッケー。
お約束の hello.c のビルド。
$ cat src/hello.c
main()
{
printf("hello,world");
}
Makefile に相当するのが Arcfile で、こんな感じ。
$ cat Arcfile
(project sample-project
basedir: "src/"
default: 'link)
(stmt build-dir
"_build")
(stmt init
(mkdir dir: (-> build-dir)))
(stmt c-sources
(fileset pattern: "*.c"))
(stmt compile
depends: 'init
(c-compile sources: (-> c-sources)
shared?: #t
outdir: (-> build-dir) ))
(stmt link
(link files: (-> compile)
shared?: #t
appnm: "hello"))
arc の README に書いてある例が out of date な気がする。 doc/ 以下の方が -current を反映しているらしいので texinfo 必須。
使ってみて思ったけど、なんというか、m4 の地獄マクロよりはマシ、mk の手抜き Makefile よりは不便かなあ。 S 式じゃなくてインデント形式にしたら、プロパティをタグごとに付けられる Makefile だった、 とかいうオチもありうる。
それと、細木数子じゃないけど、名前がよくないよな。 アーカイバの arc とモロに名前が衝突しているんですけど。 あ、Paul Graham のインタプリタもそうか。
arc のプログラムを arc でインストールして arc で圧縮して配布、とか。
もっと問題なのはぐぐっても出てこないことか。名前重要。