(all): Depends on ${WORLD} instead of ${TIT} and
[bpt/emacs.git] / leim / makefile.w32-in
CommitLineData
bc4016af
AI
1# Makefile for leim subdirectory in GNU Emacs on the Microsoft W32 API.
2# Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
3# Licensed to the Free Software Foundation.
4
5# This file is part of GNU Emacs.
6
7# GNU Emacs is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2, or (at your option)
10# any later version.
11#
12# GNU Emacs is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with GNU Emacs; see the file COPYING. If not, write to the
19# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20# Boston, MA 02111-1307, USA.
21
22srcdir=.
23
24# Where to install LEIM files.
25INSTALLDIR=$(INSTALL_DIR)/leim
26
27# On Xenix and the IBM RS6000, double-dot gets screwed up.
28dot = .
29
30# Which Emacs to use to convert TIT files to Emacs Lisp files,
31# byte-compile Emacs Lisp files, and generate the file leim-list.el.
32BUILT_EMACS = $(THISDIR)/$(dot)$(dot)/src/$(BLD)/emacs.exe
33
34buildlisppath=$(CURDIR)/$(dot)$(dot)/lisp
35
36# How to run Emacs.
37RUN_EMACS = "$(BUILT_EMACS)" -batch --no-init-file --no-site-file --multibyte
38
9cbff816
AI
39# Set EMACSLOADPATH correctly (already defined in environment).
40EMACSLOADPATH=$(buildlisppath)
41
bc4016af
AI
42# Subdirectories to be made if $(srcdir) is different from the current
43# directory.
44SUBDIRS=quail
45
46# Files generated from TIT dictionaries for Chinese GB character set.
47TIT_GB=\
bc4016af
AI
48 quail/CCDOSPY.elc \
49 quail/Punct.elc \
bc4016af
AI
50 quail/QJ.elc \
51 quail/SW.elc \
4c1dadb1 52 quail/TONEPY.elc
bc4016af
AI
53
54# Files generated from TIT dictionaries for Chinese BIG5 character set.
55TIT_BIG5=\
56 quail/4Corner.elc \
57 quail/ARRAY30.elc \
bc4016af
AI
58 quail/ECDICT.elc \
59 quail/ETZY.elc \
60 quail/Punct-b5.elc \
61 quail/PY-b5.elc \
62 quail/QJ-b5.elc \
63 quail/ZOZY.elc
64
65CHINESE_TIT=$(TIT_GB) $(TIT_BIG5)
66
67NON_TIT_GB=$(srcdir)/quail/py-punct.elc
68
4c1dadb1 69NON_TIT_BIG5=$(srcdir)/quail/pypunct-b5.elc
bc4016af 70
4c1dadb1 71CHINESE_NON_TIT=$(NON_TIT_GB) $(NON_TIT_BIG5)
bc4016af
AI
72
73CHINESE_GB=$(TIT_GB) $(NON_TIT_GB)
74
177c0ea7 75CHINESE_BIG5=$(TIT_BIG5) $(NON_TIT_BIG5)
bc4016af 76
bc4016af
AI
77JAPANESE=$(srcdir)/quail/japanese.elc $(srcdir)/ja-dic/ja-dic.elc
78
79KOREAN= $(srcdir)/quail/hangul.elc \
80 $(srcdir)/quail/hangul3.elc \
81 $(srcdir)/quail/hanja.elc \
4c1dadb1 82 $(srcdir)/quail/hanja3.elc \
bc4016af
AI
83 $(srcdir)/quail/hanja-jis.elc \
84 $(srcdir)/quail/symbol-ksc.elc
85
86THAI=$(srcdir)/quail/thai.elc
87
54679108 88VIETNAMESE=$(srcdir)/quail/viqr.elc $(srcdir)/quail/vntelex.elc
bc4016af
AI
89
90LAO=$(srcdir)/quail/lao.elc $(srcdir)/quail/lrt.elc
91
ea17b6e1 92INDIAN=$(srcdir)/quail/indian.elc
bc4016af
AI
93
94TIBETAN=$(srcdir)/quail/tibetan.elc
95
96LATIN= $(srcdir)/quail/latin-pre.elc \
97 $(srcdir)/quail/latin-post.elc \
98 $(srcdir)/quail/latin-alt.elc \
abceb4ac
JB
99 $(srcdir)/quail/latin-ltx.elc \
100 $(srcdir)/quail/welsh.elc
101
102UNICODE=$(srcdir)/quail/sgml-input.elc \
103 $(srcdir)/quail/rfc1345.elc \
104 $(srcdir)/quail/uni-input.elc
bc4016af
AI
105
106SLAVIC= \
107 $(srcdir)/quail/czech.elc \
98e99f6e 108 $(srcdir)/quail/croatian.elc \
bc4016af
AI
109 $(srcdir)/quail/slovak.elc
110
111GREEK=$(srcdir)/quail/greek.elc
112
113RUSSIAN=$(srcdir)/quail/cyrillic.elc $(srcdir)/quail/cyril-jis.elc
114
115MISC= \
116 $(srcdir)/quail/ethiopic.elc \
117 $(srcdir)/quail/ipa.elc \
abceb4ac
JB
118 $(srcdir)/quail/hebrew.elc \
119 $(srcdir)/quail/georgian.elc
bc4016af 120
4c1dadb1
AI
121MISC_DIC=\
122 quail/tsang-b5.elc \
123 quail/quick-b5.elc \
124 quail/tsang-cns.elc \
125 quail/quick-cns.elc \
126 quail/PY.elc \
36d24e3c
AI
127 quail/ZIRANMA.elc \
128 quail/CTLau.elc \
129 quail/CTLau-b5.elc
4c1dadb1
AI
130
131CHINESE=$(CHINESE_GB) $(CHINESE_BIG5)
bc4016af
AI
132EASTASIA=$(CHINESE) $(JAPANESE) $(KOREAN)
133ASIA=$(EASTASIA) $(THAI) $(VIETNAMESE) $(LAO) $(INDIAN) $(TIBETAN)
134EUROPEAN=$(LATIN) $(SLAVIC) $(GREEK) $(RUSSIAN)
abceb4ac 135WORLD=$(ASIA) $(EUROPEAN) $(MISC) $(MISC_DIC) $(UNICODE)
bc4016af
AI
136
137TIT=$(CHINESE_TIT)
138NON_TIT=$(CHINESE_NON_TIT) $(JAPANESE) $(KOREAN) $(EUROPEAN) $(MISC)
139
5c196f29
AI
140.SUFFIXES: .elc .el
141
142.el.elc:
143 $(RUN_EMACS) -f batch-byte-compile $<
144
4c1dadb1 145all: $(BUILT_EMACS) $(SUBDIRS) $(TIT) $(MISC_DIC) leim-list.el
bc4016af
AI
146
147# To ensure that we can run Emacs. This target is ignored (never
148# being hit) if a user changes default value of EMACS.
149$(dot)$(dot)/src/emacs:
150 cd ../src; $(MAKE) $(MFLAGS) emacs
151
152$(SUBDIRS):
153 mkdir "$@"
154 echo stamp>stamp-subdir
155
4c1dadb1
AI
156# The rules which generate $(TIT) and ${MISC_DIC) files create them all
157# in one go. So we need to prevent parallel execution for that target,
158# otherwise Emacs complains about files being locked. .NOTPARALLEL is
159# for GNU Make, .NO_PARALLEL is for other Make's.
160.NOTPARALLEL: $(TIT) $(MISC_DIC)
161
162.NO_PARALLEL: $(TIT) $(MISC_DIC)
163
bc4016af 164# Rule to generate quail/*.el from CXTERM-DIC/*.tit.
5c196f29 165$(TIT):
9cbff816 166 $(RUN_EMACS) -l $(buildlisppath)/international/titdic-cnv \
4c1dadb1
AI
167 --eval $(ARGQUOTE)(batch-titdic-convert t)$(ARGQUOTE) \
168 -dir quail $(srcdir)/CXTERM-DIC
9cbff816 169 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
bc4016af
AI
170 -f batch-byte-compile $(TIT:.elc=.el)
171
4c1dadb1 172# Rule to generate quail/*.el from MISC_DIC/*.tit.
5c196f29 173$(MISC_DIC):
9cbff816 174 $(RUN_EMACS) -l $(buildlisppath)/international/titdic-cnv \
4c1dadb1 175 -f batch-miscdic-convert -dir quail $(srcdir)/MISC-DIC
9cbff816 176 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
4c1dadb1
AI
177 -f batch-byte-compile $(MISC_DIC:.elc=.el)
178
bc4016af 179leim-list.el: $(SUBDIRS) $(WORLD)
9cbff816 180 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
bc4016af
AI
181 --eval $(ARGQUOTE)(update-leim-list-file $(DQUOTE).$(DQUOTE))$(ARGQUOTE)
182
183install: all
184 - mkdir "$(INSTALLDIR)"
185 - $(DEL) same-dir.tst
186 - $(DEL) $(INSTALL_DIR)/same-dir.tst
187 echo SameDirTest > $(INSTALL_DIR)/same-dir.tst
188 $(IFNOTSAMEDIR) $(CP) leim-list.el $(INSTALLDIR) $(ENDIF)
189 $(IFNOTSAMEDIR) $(CP_DIR) quail $(INSTALLDIR) $(ENDIF)
190 $(IFNOTSAMEDIR) $(CP_DIR) ja-dic $(INSTALLDIR) $(ENDIF)
191 - $(DEL) $(INSTALL_DIR)/same-dir.tst
192
193clean mostlyclean:
194 - $(FOREACH) $(TIT) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
4c1dadb1
AI
195 - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
196 - $(FOREACH) $(MISC_DIC) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
bc4016af 197 - $(FOREACH) $(TIT:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
4c1dadb1 198 - $(FOREACH) $(MISC_DIC:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
bc4016af
AI
199 - $(DEL) leim-list.el
200
201distclean maintainer-clean:
202 if exist stamp-subdir $(DELTREE) $(SUBDIRS)
203 - $(DEL) stamp-subdir
ab5796a9
MB
204
205# arch-tag: 08250c45-fa9c-4f39-a175-a0c5c36dd67b