(install-nabe): New target.
[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 install-nabe:   install-apel nabe
89         cd nabe && $(SUDO) make install-package
90
91
92 config-fonts:   chise-fonts-installer chise-fonts-installer/config.h
93
94 chise-fonts-installer/config.h:
95         cd chise-fonts-installer && ./configure $(FONTS_OPTS)
96
97 build-fonts:    config-fonts
98         cd chise-fonts-installer && make
99
100 install-fonts:  build-fonts
101         cd chise-fonts-installer && $(SUDO) make install
102
103
104 install-base:   install-ids install-nabe install-fonts
105
106
107 generate-db:    install-base
108
109 chise-db:
110         -mkdir chise-db
111         -cd chise-db && mkdir db-$(VERSION)
112         (cd `xemacs -batch -vanilla -eval \
113         '(princ (file-name-as-directory data-directory))'`chise-db; \
114                 $(TAR) cvf - * ) \
115                 | (cd chise-db/db-$(VERSION); $(TAR) xvf - )
116         -cd chise-db && ln -s db-$(VERSION) db
117
118 tar-core:       cvs-base-clean
119         cvs commit
120         sh -c 'cvs tag -R chise-core-`echo $(VERSION) | tr . _`; \
121         cd /tmp; \
122         cvs -d $(CVS_ROOT) export -d chise-core-$(VERSION) \
123                 -r chise-core-`echo $(VERSION) | tr . _` \
124                 chise-base; \
125         cd chise-core-$(VERSION); \
126         cvs -d $(CVS_ROOT) export \
127                 -r chise-core-`echo $(VERSION) | tr . _` \
128                 concord; \
129         cvs -d $(CVS_ROOT) export \
130                 -r chise-core-`echo $(VERSION) | tr . _` \
131                 libchise'
132         rsync -av chise-db /tmp/chise-core-$(VERSION)
133         cd /tmp; $(TAR) cvzf chise-core-$(VERSION).tar.gz \
134                 chise-core-$(VERSION)
135
136 tar-base:
137         cvs commit
138         sh -c 'cvs tag -R chise-base-`echo $(VERSION) | tr . _`; \
139         cd /tmp; \
140         cvs -d $(CVS_ROOT) export -d chise-base-$(VERSION) \
141                 -r chise-base-`echo $(VERSION) | tr . _` \
142                 chise-base; \
143         cd chise-base-$(VERSION); \
144         cvs -d $(CVS_ROOT) export \
145                 -r chise-base-`echo $(VERSION) | tr . _` \
146                 concord; \
147         cvs -d $(CVS_ROOT) export \
148                 -r chise-base-`echo $(VERSION) | tr . _` \
149                 libchise; \
150         cvs -d $(CVS_ROOT) export \
151                 -r chise-base-`echo $(VERSION) | tr . _` \
152                 -d xemacs-chise xemacs; \
153         cvs -d $(CVS_ROOT) export \
154                 -r chise-base-`echo $(VERSION) | tr . _` \
155                 tomoyo-tools; \
156         cvs -d $(CVS_ROOT) export \
157                 -r chise-base-`echo $(VERSION) | tr . _` \
158                 ids; \
159         cvs -d $(CVS_ROOT) export \
160                 -r chise-base-`echo $(VERSION) | tr . _` \
161                 chise-fonts-installer'
162         rsync -av chise-db /tmp/chise-base-$(VERSION)
163         cd /tmp; $(TAR) cvzf chise-base-$(VERSION).tar.gz \
164                 chise-base-$(VERSION)
165
166 get-base:       concord libchise xemacs-chise tomoyo-tools ids
167
168 concord:
169         make .cvs-login
170         cvs -z9 -d $(CVS_ROOT) co concord
171
172 libchise:
173         make .cvs-login
174         cvs -z9 -d $(CVS_ROOT) co libchise
175
176 xemacs-chise:
177         make .cvs-login
178         cvs -z9 -d $(CVS_ROOT) co -d xemacs-chise xemacs
179
180 tomoyo-tools:
181         make .cvs-login
182         cvs -z9 -d $(CVS_ROOT) co tomoyo-tools
183
184 ids:
185         make .cvs-login
186         cvs -z9 -d $(CVS_ROOT) co ids
187
188 chise-fonts-installer:
189         make .cvs-login
190         cvs -z9 -d $(CVS_ROOT) co chise-fonts-installer
191
192 .cvs-login:
193         if test "`echo $(CVS_ROOT)|grep '^:pserver:'`" != ""; then \
194                 cvs -d $(CVS_ROOT) login;\
195         fi
196         touch .cvs-login
197
198 apel:
199         make .lemi-cvs-login
200         cvs -z9 -d $(LEMI_CVS_ROOT) co apel
201
202 nabe:
203         make .lemi-cvs-login
204         cvs -z9 -d $(LEMI_CVS_ROOT) co nabe
205
206 .lemi-cvs-login:
207         if test "`echo $(LEMI_CVS_ROOT)|grep '^:pserver:'`" != ""; then \
208                 cvs -d $(LEMI_CVS_ROOT) login;\
209         fi
210         touch .lemi-cvs-login
211
212 $(LIBDIR)/xemacs/xemacs-packages:
213         cd $(LIBDIR)/xemacs && \
214         curl $(XEMACS_PACKAGES_URL)/xemacs-sumo.tar.gz \
215         | $(SUDO) $(TAR) xvzf - --exclude=apel
216
217 $(LIBDIR)/xemacs/mule-packages:
218         cd $(LIBDIR)/xemacs && \
219         curl $(XEMACS_PACKAGES_URL)/xemacs-mule-sumo.tar.gz \
220         | $(SUDO) $(TAR) xvzf -
221
222
223 distclean:
224         cd concord; make distclean
225         cd libchise; make distclean
226         cd xemacs-chise; make distclean
227         cd ids; make clean
228         cd nabe; make clean
229         cd chise-fonts-installer; make distclean
230
231
232 db-clean:
233         rm -rf chise-db
234
235 cvs-clean:      cvs-base-clean cvs-core-clean db-clean
236
237 cvs-core-clean:
238         rm -rf concord libchise
239
240 cvs-base-clean:
241         rm -rf xemacs-chise apel tomoyo-tools ids nabe chise-fonts-installer