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