update.
[chise/chise-base.git] / Makefile.in
1 VERSION = @PACKAGE_VERSION@
2
3 CC      = @CC@
4 TAR     = tar
5 SUDO    = 
6
7 prefix          = @prefix@
8 exec_prefix     = @exec_prefix@
9 BINDIR          = @bindir@
10 LIBDIR          = @libdir@
11 OPTS            = @ac_configure_args@
12 CONCORD_OPTS    = $(OPTS)
13 LIBCHISE_OPTS   = $(OPTS)
14 XEMACS_OPTS     = @xemacs_configure_args@ --pdump @xemacs_opts@ --without-xim --with-database=berkdb
15 FONTS_OPTS      = $(OPTS)
16
17 CHISE_GIT_ROOT  = http://git.chise.org/git/chise
18 ELISP_GIT_ROOT  = http://git.chise.org/git/elisp
19 CVS_ROOT = "@cvs_root@"
20 LEMI_CVS_ROOT = "@lemi_cvs_root@"
21 #XEMACS_PACKAGES_URL = http://www.chise.org/dist/XEmacs/packages/
22 XEMACS_PACKAGES_URL = http://ftp.xemacs.org/pub/xemacs/packages/
23
24 all:    build-concord build-libchise
25
26 install:        install-core
27
28
29 force-config-concord:   concord
30         cd concord && ./configure $(CONCORD_OPTS)
31
32 config-concord: concord concord/config.h
33
34 concord/config.h:
35         cd concord && ./configure $(CONCORD_OPTS)
36
37 build-concord:  config-concord
38         cd concord && make
39
40 install-concord:        build-concord $(LIBDIR)/libconcord.a
41
42 $(LIBDIR)/libconcord.a: concord/libconcord.la
43         cd concord && $(SUDO) make install
44
45
46 config-libchise:        install-concord libchise libchise/config.h
47
48 libchise/config.h:
49         cd libchise && ./configure $(LIBCHISE_OPTS)
50
51 build-libchise: config-libchise
52         cd libchise && make
53
54 install-libchise:       build-libchise $(LIBDIR)/libchise.a
55
56 $(LIBDIR)/libchise.a:   libchise/libchise.la
57         cd libchise && $(SUDO) make install
58
59
60 install-core:   install-concord install-libchise install-db
61
62 install-db:
63         -cd $(prefix)/share; $(SUDO) mkdir chise
64         (cd chise-db; $(TAR) cvf - db* ) \
65                 | (cd $(prefix)/share/chise; $(SUDO) $(TAR) xvf -)
66
67
68 config-xemacs:  xemacs-chise xemacs-chise/src/config.h
69
70 xemacs-chise/src/config.h:
71         cd xemacs-chise && ./configure --with-chise $(XEMACS_OPTS)
72
73 build-xemacs:   config-xemacs
74         cd xemacs-chise && LC_ALL=C make
75
76 install-xemacs: install-libchise $(BINDIR)/xemacs
77
78 $(BINDIR)/xemacs:       build-xemacs xemacs-chise/src/xemacs
79         cd xemacs-chise && $(SUDO) make install
80
81
82 install-apel:   install-xemacs apel $(LIBDIR)/xemacs/xemacs-packages
83         -$(SUDO) mkdir $(LIBDIR)/xemacs/site-packages
84         cd apel && LC_ALL=C $(SUDO) make install-package
85
86 install-tomoyo-tools:   install-apel tomoyo-tools $(LIBDIR)/xemacs/mule-packages
87         cd tomoyo-tools && $(SUDO) make install
88
89 install-ids:    install-tomoyo-tools ids
90         cd ids && $(SUDO) make install
91
92 install-nabe:   install-apel nabe
93         cd nabe && $(SUDO) make install-package
94
95
96 config-fonts:   chise-fonts-installer chise-fonts-installer/config.h
97
98 chise-fonts-installer/config.h:
99         cd chise-fonts-installer && ./configure $(FONTS_OPTS)
100
101 build-fonts:    config-fonts
102         cd chise-fonts-installer && make
103
104 install-fonts:  build-fonts
105         cd chise-fonts-installer && $(SUDO) make install
106
107
108 install-base:   install-ids install-nabe install-fonts
109
110
111 generate-db:    install-base
112
113 chise-db:
114         -mkdir chise-db
115         -cd chise-db && mkdir db-$(VERSION)
116         (cd `xemacs -batch -vanilla -eval \
117         '(princ (file-name-as-directory data-directory))'`chise-db; \
118                 $(TAR) cvf - * ) \
119                 | (cd chise-db/db-$(VERSION); $(TAR) xvf - )
120         -cd chise-db && ln -s db-$(VERSION) db
121
122 tar-core:       cvs-base-clean
123         cvs commit
124         sh -c 'cvs tag -R chise-core-`echo $(VERSION) | tr . _`; \
125         cd /tmp; \
126         cvs -d $(CVS_ROOT) export -d chise-core-$(VERSION) \
127                 -r chise-core-`echo $(VERSION) | tr . _` \
128                 chise-base; \
129         cd chise-core-$(VERSION); \
130         cvs -d $(CVS_ROOT) export \
131                 -r chise-core-`echo $(VERSION) | tr . _` \
132                 concord; \
133         cvs -d $(CVS_ROOT) export \
134                 -r chise-core-`echo $(VERSION) | tr . _` \
135                 libchise'
136         rsync -av chise-db /tmp/chise-core-$(VERSION)
137         cd /tmp; $(TAR) cvzf chise-core-$(VERSION).tar.gz \
138                 chise-core-$(VERSION)
139
140 tar-base:
141         cvs commit
142         sh -c 'cvs tag -R chise-base-`echo $(VERSION) | tr . _`; \
143         cd /tmp; \
144         cvs -d $(CVS_ROOT) export -d chise-base-$(VERSION) \
145                 -r chise-base-`echo $(VERSION) | tr . _` \
146                 chise-base; \
147         cd chise-base-$(VERSION); \
148         cvs -d $(CVS_ROOT) export \
149                 -r chise-base-`echo $(VERSION) | tr . _` \
150                 concord; \
151         cvs -d $(CVS_ROOT) export \
152                 -r chise-base-`echo $(VERSION) | tr . _` \
153                 libchise; \
154         cvs -d $(CVS_ROOT) export \
155                 -r chise-base-`echo $(VERSION) | tr . _` \
156                 -d xemacs-chise xemacs; \
157         cvs -d $(CVS_ROOT) export \
158                 -r chise-base-`echo $(VERSION) | tr . _` \
159                 tomoyo-tools; \
160         cvs -d $(CVS_ROOT) export \
161                 -r chise-base-`echo $(VERSION) | tr . _` \
162                 ids; \
163         cvs -d $(CVS_ROOT) export \
164                 -r chise-base-`echo $(VERSION) | tr . _` \
165                 chise-fonts-installer'
166         rsync -av chise-db /tmp/chise-base-$(VERSION)
167         cd /tmp; $(TAR) cvzf chise-base-$(VERSION).tar.gz \
168                 chise-base-$(VERSION)
169
170 get-base:       concord libchise xemacs-chise tomoyo-tools ids
171
172 concord:
173         #make .cvs-login
174         #cvs -z9 -d $(CVS_ROOT) co concord
175         git clone $(CHISE_GIT_ROOT)/concord.git
176
177 libchise:
178         #make .cvs-login
179         #cvs -z9 -d $(CVS_ROOT) co libchise
180         git clone $(CHISE_GIT_ROOT)/libchise.git
181
182 xemacs-chise:
183         #make .cvs-login
184         #cvs -z9 -d $(CVS_ROOT) co -d xemacs-chise xemacs
185         git clone $(CHISE_GIT_ROOT)/xemacs-chise.git
186
187 tomoyo-tools:
188         #make .cvs-login
189         #cvs -z9 -d $(CVS_ROOT) co tomoyo-tools
190         git clone $(CHISE_GIT_ROOT)/tomoyo-tools.git
191
192 ids:
193         #make .cvs-login
194         #cvs -z9 -d $(CVS_ROOT) co ids
195         git clone $(CHISE_GIT_ROOT)/ids.git
196
197 chise-fonts-installer:
198         #make .cvs-login
199         #cvs -z9 -d $(CVS_ROOT) co chise-fonts-installer
200         git clone $(CHISE_GIT_ROOT)/chise-fonts-installer.git
201
202 .cvs-login:
203         if test "`echo $(CVS_ROOT)|grep '^:pserver:'`" != ""; then \
204                 cvs -d $(CVS_ROOT) login;\
205         fi
206         touch .cvs-login
207
208 apel:
209         #make .lemi-cvs-login
210         #cvs -z9 -d $(LEMI_CVS_ROOT) co apel
211         git clone $(ELISP_GIT_ROOT)/apel.git
212
213 nabe:
214         #make .lemi-cvs-login
215         #cvs -z9 -d $(LEMI_CVS_ROOT) co nabe
216         git clone $(ELISP_GIT_ROOT)/nabe.git
217
218 .lemi-cvs-login:
219         if test "`echo $(LEMI_CVS_ROOT)|grep '^:pserver:'`" != ""; then \
220                 cvs -d $(LEMI_CVS_ROOT) login;\
221         fi
222         touch .lemi-cvs-login
223
224 $(LIBDIR)/xemacs/xemacs-packages:
225         cd $(LIBDIR)/xemacs && \
226         curl $(XEMACS_PACKAGES_URL)/xemacs-sumo.tar.bz2 \
227         | $(SUDO) $(TAR) xvjf - --exclude=apel
228
229 $(LIBDIR)/xemacs/mule-packages:
230         cd $(LIBDIR)/xemacs && \
231         curl $(XEMACS_PACKAGES_URL)/xemacs-mule-sumo.tar.bz2 \
232         | $(SUDO) $(TAR) xvjf -
233
234
235 distclean:
236         cd concord; make distclean
237         cd libchise; make distclean
238         cd xemacs-chise; make distclean
239         cd ids; make clean
240         cd nabe; make clean
241         cd chise-fonts-installer; make distclean
242
243 update: concord libchise xemacs-chise ids chise-fonts-installer apel nabe
244         cd concord; git pull
245         cd libchise; git pull
246         cd xemacs-chise; git pull
247         cd ids; git pull
248         cd chise-fonts-installer; git pull
249         cd apel; git pull
250         cd nabe; git pull
251
252 db-clean:
253         rm -rf chise-db
254
255 cvs-clean:      cvs-base-clean cvs-core-clean db-clean
256
257 cvs-core-clean:
258         rm -rf concord libchise
259
260 cvs-base-clean:
261         rm -rf xemacs-chise apel tomoyo-tools ids nabe chise-fonts-installer