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