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