(tar-core): Fixed.
[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-base
103         cvs -d $(CVS_ROOT) export -d chise-core-$(VERSION) \
104                 -r chise-core-`echo $(VERSION) | tr . _` \
105                 concord'
106         cvs -d $(CVS_ROOT) export -d chise-core-$(VERSION) \
107                 -r chise-core-`echo $(VERSION) | tr . _` \
108                 libchise'
109         cd ..
110         #cd /tmp; mkdir chise-core-$(VERSION)
111         #rsync -av Makefile libchise chise-db \
112         #        xemacs-chise ids 
113         #       /tmp/chise-core-$(VERSION)
114         #rsync -av Makefile concord libchise chise-db \
115         #       /tmp/chise-core-$(VERSION)
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 get-base:       concord libchise xemacs-chise tomoyo-tools ids
121
122 concord:        .cvs-login
123         cvs -z9 -d $(CVS_ROOT) co concord
124
125 libchise:       .cvs-login
126         cvs -z9 -d $(CVS_ROOT) co libchise
127
128 xemacs-chise:   .cvs-login
129         cvs -z9 -d $(CVS_ROOT) co -d xemacs-chise xemacs
130
131 tomoyo-tools:   .cvs-login
132         cvs -z9 -d $(CVS_ROOT) co tomoyo-tools
133
134 ids:    .cvs-login
135         cvs -z9 -d $(CVS_ROOT) co ids
136
137 .cvs-login:
138         cvs -d $(CVS_ROOT) login
139         touch .cvs-login
140
141
142 distclean:
143         cd concord; make distclean
144         cd libchise; make distclean
145         cd xemacs-chise; make distclean
146         cd ids; make clean
147
148
149 db-clean:
150         rm -rf chise-db
151
152 cvs-clean:      cvs-base-clean cvs-core-clean db-clean
153
154 cvs-core-clean:
155         rm -rf concord libchise
156
157 cvs-base-clean:
158         rm -rf xemacs-chise tomoyo-tools ids