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