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