caam

view README.md @ 22:9bc5672fe642

More formatted
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 10 Dec 2017 21:37:30 +0900
parents edfc5d3bc208
children b7cce3f957a0
line source
1 # CAAM: Configure && Make Helper
3 If you want to install some applications into certain directory via build from
4 source, use caam to call ./configure and make continuously with the same
5 command line environment.
7 アプリケーションはソースからのビルドが基本。そんなちみは caam を使いたまへ。イ
8 ンストールするときは特定の閉じたPREFIXにいれるのだ、そのほうが消したりしやすい
9 から、という運用の利点が理解できる人はぜし caam を。caam はコンパイル環境を設定
10 する環境変数を適切に設定して連続的に make を呼ぶ。こうすることで ./configure し
11 ているときに設定した変数をキープしたままmakeでコンパイラを呼べる。そのときに
12 CFLAGS, CPPFLAGS, LDFLAGS, LD_RUN_PATH, LD_LIBRARY_PATH, PKG_CONFIG_PATH をしっ
13 かり設定し、なおかつ autoconf によってそれらの変数が継承されない場合でも gcc/
14 c++ をwrapして上記変数の意味する値がちゃんと伝わるように努力する。コンパイルで
15 こけそうな可能性を最大限に小さくするのが caamである。
17 The caam scripts are obtained from Mercurial repository.
19 hg clone http://www.yatex.org/hgrepos/caam
21 ## Installation
23 The caam script assumes your application installation hierarchy as follows(/usr
24 /local as an example).
26 --[/usr/local/]
27 |
28 +-[audio/] # command and libraries related to audio/sound
29 | +-[bin/]
30 | +-[include/]
31 | +-[lib/]
32 | +-[man/]
33 | +-[share/]
34 +-[bin/]
35 +-[gimp-1/] # GIMP-1.x
36 | +-[bin/]
37 | +-[lib/]
38 | :
39 +-[gimp-2/] # GIMP-2.x
40 | +-[bin/]
41 | +-[lib/]
42 | :
43 +-[gtk1/] # cmd and libs related to gtk1
44 | +-[bin/]
45 | +-[include/]
46 | +-[lib/]
47 | +-[man/]
48 | :
49 +-[gtk2/] # cmd and libs related to gtk2
50 | +-[bin/]
51 | +-[include/]
52 | :
53 +-[include/]
54 +-[lib/]
55 :
56 :
58 Then, locate caam in /usr/local/caam/bin.
60 gtar zxpfC caam20150311.tar.gz /usr/local
61 or
62 hg clone http://www.yatex.org/hgrepos/caam /usr/local/caam
64 もし、ソースビルドで管理しているアプリケーションのインストールPREFIX が /usr/
65 local だとしたら、上記のように /usr/local/caam 以下にcaamをインストールし、 /
66 usr/local/caam/bin/にPATHを通して使う。
68 If your local application's prefix is /opt/sfw, then locate caam at /opt/sfw/
69 caam.
71 ## How to Use
73 caam は、デフォルトで ./configure と make を続けて呼ぶ。caamには、caam自身のオ
74 プションに続けてその場の configure に与えるオプションを渡せばよい。 caam自身の
75 オプションは以下の通り。
77 |オプション| 意味
78 ----------|------
79 |-c | configureのみ(makeしない)
80 |-m | makeのみ(configureしない)
81 |-g | makeでなくgmakeを呼ぶ
82 |-jN | make -jN で呼ぶ
83 |-t TGT | make allのかわりに make TGTで起動
84 |-s SEC | configure後、SEC 秒間停止する
85 |-S | configure後 suspend する(fgで継続)
86 |-l | configureで生成されたlibtoolではなくシステムの libtool を利用させる
87 |-mai | make all installする
88 |-maic | make all install cleanする
89 |-gmai | gmake all installする
90 |-gmaic | gmake all install cleanする
92 たとえば、dual coreなマシンで configure --prefix=/opt/hoge && gmake -j3 all &
93 gmake install するなら、
95 caam -gmai -j3 --prefix=/opt/hoge
97 とする。
99 独自ビルドで gtk2 のライブラリがすべて /usr/local/gtk2 に入っているときにgtk2も
100 ののアプリケーションをビルドするならたとえばこうする(systemのPREFIXが /usr/
101 local の場合)。
103 CAAM_ADD=gtk2 caam -maic --prefix=/usr/local/gqview2
105 こうすると、CFLAGS(とCPPFLAGS)に -I/usr/local/gtk2 を必ず付け、 LDFLAGSに -L/
106 usr/local/gtk2 -R/usr/local/gtk2 を必ず付けた状態で configure と make が呼ばれ
107 る。もちろん、上記の例がうまく行くためにはgtk2関連のライブラリをすべて
109 CAAM_ADD=gtk2 caam -maic --prefix=/usr/local/gtk2
111 でインストールしておく必要がある。逆にいえばgtk2ライブラリはほぼ全て上記コマン
112 ドラインでインストールすることができ、gtk2 を利用するアプリケーションは、
114 CAAM_ADD=gtk2 caam -maic --prefix=/usr/local/application
116 でインストールすることができる。実行時のライブラリパスも /usr/local/gtk2 として
117 埋め込まれる。
119 gtk1とgtk2を両方同時に使いたいという場合は、双方を隔離してインストールする必要
120 があるのでcaamのような機構が有用なのである。