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