[TMP] enable load_prefer_newer
[bpt/emacs.git] / leim / makefile.w32-in
1 # -*- Makefile -*- for leim subdirectory in GNU Emacs on the Microsoft Windows API.
2
3 # Copyright (C) 2000-2014 Free Software Foundation, Inc.
4 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
5 # 2006, 2007
6 # National Institute of Advanced Industrial Science and Technology (AIST)
7 # Registration Number H14PRO021
8
9 # This file is part of GNU Emacs.
10
11 # GNU Emacs is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
15
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.
20
21 # You should have received a copy of the GNU General Public License
22 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23
24
25 srcdir=.
26
27 # Where to install LEIM files.
28 INSTALLDIR=$(INSTALL_DIR)/leim
29
30 # On IBM RS6000, double-dot gets screwed up.
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-site-file --no-site-lisp
41
42 # Set EMACSLOADPATH correctly (already defined in environment).
43 EMACSLOADPATH=$(buildlisppath)
44
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=\
51 quail/CCDOSPY.elc \
52 quail/Punct.elc \
53 quail/QJ.elc \
54 quail/SW.elc \
55 quail/TONEPY.elc
56
57 # Files generated from TIT dictionaries for Chinese BIG5 character set.
58 TIT_BIG5=\
59 quail/4Corner.elc \
60 quail/ARRAY30.elc \
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
72 NON_TIT_BIG5=$(srcdir)/quail/pypunct-b5.elc
73
74 CHINESE_NON_TIT=$(NON_TIT_GB) $(NON_TIT_BIG5)
75
76 CHINESE_GB=$(TIT_GB) $(NON_TIT_GB)
77
78 CHINESE_BIG5=$(TIT_BIG5) $(NON_TIT_BIG5)
79
80 JAPANESE=$(srcdir)/quail/japanese.elc $(srcdir)/ja-dic/ja-dic.elc
81
82 KOREAN= $(srcdir)/quail/hangul.elc \
83 $(srcdir)/quail/hanja.elc \
84 $(srcdir)/quail/hanja3.elc \
85 $(srcdir)/quail/hanja-jis.elc \
86 $(srcdir)/quail/symbol-ksc.elc
87
88 THAI=$(srcdir)/quail/thai.elc
89
90 VIETNAMESE=$(srcdir)/quail/viqr.elc $(srcdir)/quail/vntelex.elc
91
92 LAO=$(srcdir)/quail/lao.elc $(srcdir)/quail/lrt.elc
93
94 INDIAN=$(srcdir)/quail/indian.elc
95
96 TIBETAN=$(srcdir)/quail/tibetan.elc
97
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 \
102 $(srcdir)/quail/welsh.elc
103
104 UNICODE=$(srcdir)/quail/sgml-input.elc \
105 $(srcdir)/quail/rfc1345.elc \
106 $(srcdir)/quail/uni-input.elc
107
108 SLAVIC= \
109 $(srcdir)/quail/czech.elc \
110 $(srcdir)/quail/croatian.elc \
111 $(srcdir)/quail/slovak.elc
112
113 GREEK=$(srcdir)/quail/greek.elc
114
115 RUSSIAN=$(srcdir)/quail/cyrillic.elc $(srcdir)/quail/cyril-jis.elc
116
117 MISC= \
118 $(srcdir)/quail/arabic.elc \
119 $(srcdir)/quail/ethiopic.elc \
120 $(srcdir)/quail/ipa.elc \
121 $(srcdir)/quail/ipa-praat.elc \
122 $(srcdir)/quail/hebrew.elc \
123 $(srcdir)/quail/georgian.elc \
124 $(srcdir)/quail/persian.elc \
125 $(srcdir)/quail/sisheng.elc
126
127 MISC_DIC=\
128 quail/tsang-b5.elc \
129 quail/quick-b5.elc \
130 quail/tsang-cns.elc \
131 quail/quick-cns.elc \
132 quail/PY.elc \
133 quail/ZIRANMA.elc \
134 quail/CTLau.elc \
135 quail/CTLau-b5.elc
136
137 CHINESE=$(CHINESE_GB) $(CHINESE_BIG5)
138 EASTASIA=$(CHINESE) $(JAPANESE) $(KOREAN)
139 ASIA=$(EASTASIA) $(THAI) $(VIETNAMESE) $(LAO) $(INDIAN) $(TIBETAN)
140 EUROPEAN=$(LATIN) $(SLAVIC) $(GREEK) $(RUSSIAN)
141 WORLD=$(ASIA) $(EUROPEAN) $(MISC) $(MISC_DIC) $(UNICODE)
142
143 TIT=$(CHINESE_TIT)
144 NON_TIT=$(CHINESE_NON_TIT) $(JAPANESE) $(KOREAN) $(EUROPEAN) $(MISC)
145
146 .SUFFIXES: .elc .el
147
148 .el.elc:
149 $(RUN_EMACS) -f batch-byte-compile $<
150
151 all: $(BUILT_EMACS) $(SUBDIRS) $(WORLD) leim-list.el
152
153 # To ensure that we can run Emacs. This target is ignored (never
154 # being hit) if a user changes default value of EMACS.
155 $(dot)$(dot)/src/emacs:
156 cd ../src; $(MAKE) $(MFLAGS) emacs
157
158 $(SUBDIRS):
159 mkdir "$@"
160 echo stamp>stamp-subdir
161
162 # The rules which generate $(TIT) and ${MISC_DIC) files create them all
163 # in one go. So we need to prevent parallel execution for that target,
164 # otherwise Emacs complains about files being locked. .NOTPARALLEL is
165 # for GNU Make, .NO_PARALLEL is for other Make's.
166 .NOTPARALLEL: $(TIT) $(MISC_DIC)
167
168 .NO_PARALLEL: $(TIT) $(MISC_DIC)
169
170 # Rule to generate quail/*.el from CXTERM-DIC/*.tit.
171 #
172 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
173 # this can break with GNU Make 3.81 and later if sh.exe is used.
174 $(TIT):
175 $(RUN_EMACS) -l \
176 $(ARGQUOTE)$(buildlisppath)/international/titdic-cnv$(ARGQUOTE) \
177 --eval $(ARGQUOTE)(batch-titdic-convert t)$(ARGQUOTE) \
178 -dir quail $(srcdir)/CXTERM-DIC
179 $(RUN_EMACS) -l \
180 $(ARGQUOTE)$(buildlisppath)/international/quail$(ARGQUOTE) \
181 -f batch-byte-compile $(TIT:.elc=.el)
182
183 # Rule to generate quail/*.el from MISC_DIC/*.tit.
184 $(MISC_DIC):
185 $(RUN_EMACS) -l \
186 $(ARGQUOTE)$(buildlisppath)/international/titdic-cnv$(ARGQUOTE) \
187 -f batch-miscdic-convert -dir quail $(srcdir)/MISC-DIC
188 $(RUN_EMACS) -l \
189 $(ARGQUOTE)$(buildlisppath)/international/quail$(ARGQUOTE) \
190 -f batch-byte-compile $(MISC_DIC:.elc=.el)
191
192 # Rule to generate ja-dic/ja-dic.el from SKK-DIC/SKK-JISYO.L.
193 $(srcdir)/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
194 - mkdir ja-dic
195 $(RUN_EMACS) -l \
196 $(ARGQUOTE)$(buildlisppath)/international/ja-dic-cnv$(ARGQUOTE) \
197 -f batch-skkdic-convert -dir ja-dic $(srcdir)/SKK-DIC/SKK-JISYO.L
198
199 #
200 # WARNING: Do NOT split the parts inside $(ARGQUOTE)s into multiple lines as
201 # this can break with GNU Make 3.81 and later if sh.exe is used.
202 leim-list.el: $(SUBDIRS) $(WORLD) $(srcdir)/leim-ext.el
203 - $(DEL) leim-list.el
204 $(RUN_EMACS) -l \
205 $(ARGQUOTE)$(buildlisppath)/international/quail$(ARGQUOTE) \
206 --eval $(ARGQUOTE)(update-leim-list-file $(DQUOTE).$(DQUOTE))$(ARGQUOTE)
207 $(RUN_EMACS) --eval $(ARGQUOTE)(w32-append-code-lines $(DQUOTE)$@$(DQUOTE) $(DQUOTE)$(srcdir)/leim-ext.el$(DQUOTE))$(ARGQUOTE)
208
209 install: all
210 - mkdir "$(INSTALLDIR)"
211 - $(DEL) $(DIRNAME)_same-dir.tst
212 - $(DEL) $(INSTALL_DIR)/$(DIRNAME)_same-dir.tst
213 echo SameDirTest > $(INSTALL_DIR)/$(DIRNAME)_same-dir.tst
214 $(IFNOTSAMEDIR) $(CP) leim-list.el $(INSTALLDIR) $(ENDIF)
215 $(IFNOTSAMEDIR) $(CP_DIR) quail $(INSTALLDIR) $(ENDIF)
216 $(IFNOTSAMEDIR) $(CP_DIR) ja-dic $(INSTALLDIR) $(ENDIF)
217 - $(DEL) $(INSTALL_DIR)/$(DIRNAME)_same-dir.tst
218
219 clean mostlyclean:
220 - $(FOREACH) $(TIT) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
221 - $(FOREACH) $(MISC_DIC) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
222 - $(FOREACH) $(TIT:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
223 - $(FOREACH) $(MISC_DIC:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
224 - $(DEL) leim-list.el
225 - $(DEL) leim-list.el~
226
227 distclean: clean
228 - $(DEL) stamp-subdir
229 - $(DEL) makefile
230
231 maintainer-clean: distclean
232 - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
233
234 # We used to delete *~ here, but that might inadvertently remove
235 # precious files if it happens to match their short 8+3 aliases.
236 extraclean: maintainer-clean
237 - $(FOREACH) *.el~ "#*" $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)