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