caam

view README.md @ 37:a151a2cb61e8

Recent pkgconfig stays in $prefix/share.
author HIROSE Yuuji <yuuji@gentei.org>
date Sat, 29 Feb 2020 10:38:49 +0900
parents b7cce3f957a0
children
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 hg clone https://www.yatex.org/hgrepos/caam /usr/local/caam
62 or
64 git clone https://www.yatex.org/gitbucket/git/yuuji/caam.git
66 もし、ソースビルドで管理しているアプリケーションのインストールPREFIX が /usr/
67 local だとしたら、上記のように /usr/local/caam 以下にcaamをインストールし、 /
68 usr/local/caam/bin/にPATHを通して使う。
70 If your local application's prefix is /opt/sfw, then locate caam at /opt/sfw/
71 caam.
73 ## How to Use
75 caam は、デフォルトで ./configure と make を続けて呼ぶ。caamには、caam自身のオ
76 プションに続けてその場の configure に与えるオプションを渡せばよい。 caam自身の
77 オプションは以下の通り。
79 オプション| 意味
80 ----------|------
81 -c | configureのみ(makeしない)
82 -m | makeのみ(configureしない)
83 -g | makeでなくgmakeを呼ぶ
84 -jN | make -jN で呼ぶ
85 -t TGT | make allのかわりに make TGTで起動
86 -s SEC | configure後、SEC 秒間停止する
87 -S | configure後 suspend する(fgで継続)
88 -l | configureで生成されたlibtoolではなくシステムの libtool を利用させる
89 -mai | make all installする
90 -maic | make all install cleanする
91 -gmai | gmake all installする
92 -gmaic | gmake all install cleanする
94 たとえば、dual coreなマシンで configure --prefix=/opt/hoge && gmake -j3 all &
95 gmake install するなら、
97 caam -gmai -j3 --prefix=/opt/hoge
99 とする。
101 独自ビルドで gtk2 のライブラリがすべて /usr/local/gtk2 に入っているときにgtk2も
102 ののアプリケーションをビルドするならたとえばこうする(systemのPREFIXが /usr/
103 local の場合)。
105 CAAM_ADD=gtk2 caam -maic --prefix=/usr/local/gqview2
107 こうすると、CFLAGS(とCPPFLAGS)に -I/usr/local/gtk2 を必ず付け、 LDFLAGSに -L/
108 usr/local/gtk2 -R/usr/local/gtk2 を必ず付けた状態で configure と make が呼ばれ
109 る。もちろん、上記の例がうまく行くためにはgtk2関連のライブラリをすべて
111 CAAM_ADD=gtk2 caam -maic --prefix=/usr/local/gtk2
113 でインストールしておく必要がある。逆にいえばgtk2ライブラリはほぼ全て上記コマン
114 ドラインでインストールすることができ、gtk2 を利用するアプリケーションは、
116 CAAM_ADD=gtk2 caam -maic --prefix=/usr/local/application
118 でインストールすることができる。実行時のライブラリパスも /usr/local/gtk2 として
119 埋め込まれる。
121 gtk1とgtk2を両方同時に使いたいという場合は、双方を隔離してインストールする必要
122 があるのでcaamのような機構が有用なのである。