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