Commit | Line | Data |
---|---|---|
b37434d3 GM |
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 | ||
177c0ea7 | 22 | # |
b37434d3 GM |
23 | # Sets up the system dependent macros. |
24 | # | |
25 | !include ..\nt\makefile.def | |
26 | ||
27 | srcdir=. | |
28 | ||
29 | # Where to install LEIM files. | |
30 | INSTALLDIR=$(INSTALL_DIR)\leim | |
31 | ||
32 | # On Xenix and the IBM RS6000, double-dot gets screwed up. | |
33 | dot = . | |
34 | ||
35 | # Which Emacs to use to convert TIT files to Emacs Lisp files, | |
36 | # byte-compile Emacs Lisp files, and generate the file leim-list.el. | |
37 | BUILT_EMACS = $(dot)$(dot)\src\$(BLD)\emacs.exe | |
38 | ||
4c6f814e | 39 | buildlisppath=$(MAKEDIR:\=/)/$(dot)$(dot)/lisp |
b37434d3 GM |
40 | |
41 | # How to run Emacs. | |
42 | RUN_EMACS = $(BUILT_EMACS) -batch --no-init-file --no-site-file --multibyte | |
43 | ||
44 | # Subdirectories to be made if $(srcdir) is different from the current | |
45 | # directory. | |
46 | SUBDIRS=quail | |
47 | ||
48 | # Files generated from TIT dictionaries for Chinese GB character set. | |
49 | TIT_GB=\ | |
e44c759d AI |
50 | quail/CCDOSPY.elc \ |
51 | quail/Punct.elc \ | |
e44c759d AI |
52 | quail/QJ.elc \ |
53 | quail/SW.elc \ | |
ec797bb9 | 54 | quail/TONEPY.elc |
b37434d3 GM |
55 | |
56 | # Files generated from TIT dictionaries for Chinese BIG5 character set. | |
57 | TIT_BIG5=\ | |
e44c759d AI |
58 | quail/4Corner.elc \ |
59 | quail/ARRAY30.elc \ | |
e44c759d AI |
60 | quail/ECDICT.elc \ |
61 | quail/ETZY.elc \ | |
62 | quail/Punct-b5.elc \ | |
63 | quail/PY-b5.elc \ | |
64 | quail/QJ-b5.elc \ | |
65 | quail/ZOZY.elc | |
b37434d3 GM |
66 | |
67 | CHINESE_TIT=$(TIT_GB) $(TIT_BIG5) | |
68 | ||
e44c759d | 69 | NON_TIT_GB=$(srcdir)/quail/py-punct.elc |
b37434d3 | 70 | |
ec797bb9 | 71 | NON_TIT_BIG5=$(srcdir)/quail/quick-b5.elc |
b37434d3 | 72 | |
ec797bb9 | 73 | CHINESE_NON_TIT=$(NON_TIT_GB) $(NON_TIT_BIG5) |
b37434d3 GM |
74 | |
75 | CHINESE_GB=$(TIT_GB) $(NON_TIT_GB) | |
76 | ||
177c0ea7 | 77 | CHINESE_BIG5=$(TIT_BIG5) $(NON_TIT_BIG5) |
b37434d3 | 78 | |
e44c759d | 79 | JAPANESE=$(srcdir)/quail/japanese.elc $(srcdir)/ja-dic/ja-dic.elc |
b37434d3 | 80 | |
e44c759d AI |
81 | KOREAN= $(srcdir)/quail/hangul.elc \ |
82 | $(srcdir)/quail/hangul3.elc \ | |
83 | $(srcdir)/quail/hanja.elc \ | |
ec797bb9 | 84 | $(srcdir)/quail/hanja3.elc \ |
e44c759d AI |
85 | $(srcdir)/quail/hanja-jis.elc \ |
86 | $(srcdir)/quail/symbol-ksc.elc | |
b37434d3 | 87 | |
e44c759d | 88 | THAI=$(srcdir)/quail/thai.elc |
b37434d3 | 89 | |
54679108 | 90 | VIETNAMESE=$(srcdir)/quail/viqr.elc $(srcdir)/quail/vntelex.elc |
b37434d3 | 91 | |
e44c759d | 92 | LAO=$(srcdir)/quail/lao.elc $(srcdir)/quail/lrt.elc |
b37434d3 | 93 | |
ea17b6e1 | 94 | INDIAN=$(srcdir)/quail/indian.elc |
b37434d3 | 95 | |
e44c759d | 96 | TIBETAN=$(srcdir)/quail/tibetan.elc |
b37434d3 | 97 | |
ec797bb9 AI |
98 | LATIN= $(srcdir)/quail/latin-pre.elc \ |
99 | $(srcdir)/quail/latin-post.elc \ | |
100 | $(srcdir)/quail/latin-alt.elc \ | |
101 | $(srcdir)/quail/latin-ltx.elc | |
b37434d3 GM |
102 | |
103 | SLAVIC= \ | |
e44c759d AI |
104 | $(srcdir)/quail/czech.elc \ |
105 | $(srcdir)/quail/slovak.elc | |
b37434d3 | 106 | |
e44c759d | 107 | GREEK=$(srcdir)/quail/greek.elc |
b37434d3 | 108 | |
e44c759d | 109 | RUSSIAN=$(srcdir)/quail/cyrillic.elc $(srcdir)/quail/cyril-jis.elc |
b37434d3 GM |
110 | |
111 | MISC= \ | |
e44c759d AI |
112 | $(srcdir)/quail/ethiopic.elc \ |
113 | $(srcdir)/quail/ipa.elc \ | |
114 | $(srcdir)/quail/hebrew.elc | |
b37434d3 | 115 | |
ec797bb9 AI |
116 | MISC_DIC=\ |
117 | quail/tsang-b5.elc \ | |
118 | quail/quick-b5.elc \ | |
119 | quail/tsang-cns.elc \ | |
120 | quail/quick-cns.elc \ | |
121 | quail/PY.elc \ | |
122 | quail/ZIRANMA.elc \ | |
123 | quail/CTLau.elc \ | |
124 | quail/CTLau-b5.elc | |
125 | ||
126 | CHINESE=$(CHINESE_GB) $(CHINESE_BIG5) | |
b37434d3 GM |
127 | EASTASIA=$(CHINESE) $(JAPANESE) $(KOREAN) |
128 | ASIA=$(EASTASIA) $(THAI) $(VIETNAMESE) $(LAO) $(INDIAN) $(TIBETAN) | |
129 | EUROPEAN=$(LATIN) $(SLAVIC) $(GREEK) $(RUSSIAN) | |
130 | WORLD=$(ASIA) $(EUROPEAN) $(MISC) | |
131 | ||
132 | TIT=$(CHINESE_TIT) | |
133 | NON_TIT=$(CHINESE_NON_TIT) $(JAPANESE) $(KOREAN) $(EUROPEAN) $(MISC) | |
134 | ||
ec797bb9 | 135 | all: $(BUILT_EMACS) $(SUBDIRS) $(TIT) $(MISC_DIC) leim-list.el |
b37434d3 GM |
136 | |
137 | # To ensure that we can run Emacs. This target is ignored (never | |
138 | # being hit) if a user changes default value of EMACS. | |
139 | $(dot)$(dot)/src/emacs: | |
140 | cd ../src; $(MAKE) $(MFLAGS) emacs | |
141 | ||
142 | $(SUBDIRS): | |
143 | mkdir $@ | |
144 | echo stamp>stamp-subdir | |
b37434d3 | 145 | |
ec797bb9 AI |
146 | # The rules which generate $(TIT) and ${MISC_DIC) files create them all |
147 | # in one go. So we need to prevent parallel execution for that target, | |
148 | # otherwise Emacs complains about files being locked. .NOTPARALLEL is | |
149 | # for GNU Make, .NO_PARALLEL is for other Make's. | |
150 | .NOTPARALLEL: $(TIT) $(MISC_DIC) | |
151 | ||
152 | .NO_PARALLEL: $(TIT) $(MISC_DIC) | |
153 | ||
b37434d3 | 154 | # Rule to generate quail/*.el from CXTERM-DIC/*.tit. |
e44c759d | 155 | $(TIT): $(SUBDIRS) |
45e5607f | 156 | set EMACSLOADPATH=$(buildlisppath) |
b37434d3 GM |
157 | $(RUN_EMACS) -l $(buildlisppath)/international/titdic-cnv \ |
158 | --eval "(batch-titdic-convert t)" -dir quail $(srcdir)/CXTERM-DIC | |
159 | $(RUN_EMACS) -l $(buildlisppath)/international/quail \ | |
4c6f814e | 160 | -f batch-byte-compile $(TIT:.elc=.el) |
b37434d3 | 161 | |
ec797bb9 AI |
162 | # Rule to generate quail/*.el from CXTERM-DIC/*.tit. |
163 | $(MISC_DIC): $(SUBDIRS) | |
164 | set EMACSLOADPATH=$(buildlisppath) | |
165 | $(RUN_EMACS) -l $(buildlisppath)/international/titdic-cnv \ | |
166 | -f batch-miscdic-convert -dir quail $(srcdir)/MISC-DIC | |
167 | $(RUN_EMACS) -l $(buildlisppath)/international/quail \ | |
168 | -f batch-byte-compile $(MISC_DIC:.elc=.el) | |
169 | ||
24c53d36 AI |
170 | .SUFFIXES: .elc .el |
171 | ||
e44c759d AI |
172 | .el.elc: |
173 | set EMACSLOADPATH=$(buildlisppath) | |
174 | $(RUN_EMACS) -f batch-byte-compile $< | |
175 | ||
b37434d3 | 176 | leim-list.el: $(SUBDIRS) $(WORLD) |
45e5607f | 177 | set EMACSLOADPATH=$(buildlisppath) |
b37434d3 GM |
178 | $(RUN_EMACS) -l $(buildlisppath)/international/quail \ |
179 | --eval "(update-leim-list-file \".\")" | |
180 | ||
181 | install: all | |
182 | - mkdir $(INSTALLDIR) | |
183 | - $(DEL) same-dir.tst | |
184 | - $(DEL) $(INSTALLDIR)\same-dir.tst | |
185 | echo SameDirTest > $(INSTALLDIR)\same-dir.tst | |
186 | if not exist same-dir.tst $(CP) leim-list.el $(INSTALLDIR) | |
b37434d3 | 187 | if not exist same-dir.tst $(CP_DIR) quail $(INSTALLDIR)\quail |
7b273f2f | 188 | if not exist same-dir.tst $(CP_DIR) ja-dic $(INSTALLDIR)\ja-dic |
b37434d3 GM |
189 | - $(DEL) $(INSTALLDIR)\same-dir.tst |
190 | ||
ec797bb9 AI |
191 | TIT_EL=$(TIT:.elc=.el) |
192 | MISC_DIC_EL=$(MISC_DIC:.elc=.el) | |
193 | ||
b37434d3 | 194 | clean mostlyclean: |
b37434d3 | 195 | for %%f in ($(TIT:/=\)) do $(DEL) %%f |
ec797bb9 AI |
196 | for %%f in ($(TIT_EL:/=\)) do $(DEL) %%f |
197 | for %%f in ($(MISC_DIC:/=\)) do $(DEL) %%f | |
198 | for %%f in ($(MISC_DIC_EL:/=\)) do $(DEL) %%f | |
199 | for %%f in ($(WORLD:/=\)) do $(DEL) %%f | |
b37434d3 GM |
200 | $(DEL) leim-list.el |
201 | ||
202 | distclean maintainer-clean: | |
203 | if exist stamp-subdir $(DELTREE) $(SUBDIRS) | |
204 | $(DEL) stamp-subdir |