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