1 # -*- Makefile -*- for leim subdirectory in GNU Emacs on the Microsoft W32 API.
2 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
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
8 # This file is part of GNU Emacs.
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)
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.
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
22 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 # Boston, MA 02110-1301, USA.
27 # Where to install LEIM files.
28 INSTALLDIR=$(INSTALL_DIR)/leim
30 # On Xenix and the IBM RS6000, double-dot gets screwed up.
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
37 buildlisppath=$(CURDIR)/$(dot)$(dot)/lisp
40 RUN_EMACS = "$(BUILT_EMACS)" -batch --no-init-file --no-site-file --multibyte
42 # Set EMACSLOADPATH correctly (already defined in environment).
43 EMACSLOADPATH=$(buildlisppath)
45 # Subdirectories to be made if $(srcdir) is different from the current
49 # Files generated from TIT dictionaries for Chinese GB character set.
57 # Files generated from TIT dictionaries for Chinese BIG5 character set.
68 CHINESE_TIT=$(TIT_GB) $(TIT_BIG5)
70 NON_TIT_GB=$(srcdir)/quail/py-punct.elc
72 NON_TIT_BIG5=$(srcdir)/quail/pypunct-b5.elc
74 CHINESE_NON_TIT=$(NON_TIT_GB) $(NON_TIT_BIG5)
76 CHINESE_GB=$(TIT_GB) $(NON_TIT_GB)
78 CHINESE_BIG5=$(TIT_BIG5) $(NON_TIT_BIG5)
80 JAPANESE=$(srcdir)/quail/japanese.elc $(srcdir)/ja-dic/ja-dic.elc
82 KOREAN= $(srcdir)/quail/hangul.elc \
83 $(srcdir)/quail/hangul3.elc \
84 $(srcdir)/quail/hanja.elc \
85 $(srcdir)/quail/hanja3.elc \
86 $(srcdir)/quail/hanja-jis.elc \
87 $(srcdir)/quail/symbol-ksc.elc
89 THAI=$(srcdir)/quail/thai.elc
91 VIETNAMESE=$(srcdir)/quail/viqr.elc $(srcdir)/quail/vntelex.elc
93 LAO=$(srcdir)/quail/lao.elc $(srcdir)/quail/lrt.elc
95 INDIAN=$(srcdir)/quail/indian.elc
97 TIBETAN=$(srcdir)/quail/tibetan.elc
99 LATIN= $(srcdir)/quail/latin-pre.elc \
100 $(srcdir)/quail/latin-post.elc \
101 $(srcdir)/quail/latin-alt.elc \
102 $(srcdir)/quail/latin-ltx.elc \
103 $(srcdir)/quail/welsh.elc
105 UNICODE=$(srcdir)/quail/sgml-input.elc \
106 $(srcdir)/quail/rfc1345.elc \
107 $(srcdir)/quail/uni-input.elc
110 $(srcdir)/quail/czech.elc \
111 $(srcdir)/quail/croatian.elc \
112 $(srcdir)/quail/slovak.elc
114 GREEK=$(srcdir)/quail/greek.elc
116 RUSSIAN=$(srcdir)/quail/cyrillic.elc $(srcdir)/quail/cyril-jis.elc
119 $(srcdir)/quail/ethiopic.elc \
120 $(srcdir)/quail/ipa.elc \
121 $(srcdir)/quail/hebrew.elc \
122 $(srcdir)/quail/georgian.elc
127 quail/tsang-cns.elc \
128 quail/quick-cns.elc \
134 CHINESE=$(CHINESE_GB) $(CHINESE_BIG5)
135 EASTASIA=$(CHINESE) $(JAPANESE) $(KOREAN)
136 ASIA=$(EASTASIA) $(THAI) $(VIETNAMESE) $(LAO) $(INDIAN) $(TIBETAN)
137 EUROPEAN=$(LATIN) $(SLAVIC) $(GREEK) $(RUSSIAN)
138 WORLD=$(ASIA) $(EUROPEAN) $(MISC) $(MISC_DIC) $(UNICODE)
141 NON_TIT=$(CHINESE_NON_TIT) $(JAPANESE) $(KOREAN) $(EUROPEAN) $(MISC)
146 $(RUN_EMACS) -f batch-byte-compile $<
148 all: $(BUILT_EMACS) $(SUBDIRS) $(WORLD) leim-list.el
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
157 echo stamp>stamp-subdir
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)
165 .NO_PARALLEL: $(TIT) $(MISC_DIC)
167 # Rule to generate quail/*.el from CXTERM-DIC/*.tit.
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.
172 $(RUN_EMACS) -l $(buildlisppath)/international/titdic-cnv \
173 --eval $(ARGQUOTE)(batch-titdic-convert t)$(ARGQUOTE) \
174 -dir quail $(srcdir)/CXTERM-DIC
175 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
176 -f batch-byte-compile $(TIT:.elc=.el)
178 # Rule to generate quail/*.el from MISC_DIC/*.tit.
180 $(RUN_EMACS) -l $(buildlisppath)/international/titdic-cnv \
181 -f batch-miscdic-convert -dir quail $(srcdir)/MISC-DIC
182 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
183 -f batch-byte-compile $(MISC_DIC:.elc=.el)
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.
188 leim-list.el: $(SUBDIRS) $(WORLD)
189 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
190 --eval $(ARGQUOTE)(update-leim-list-file $(DQUOTE).$(DQUOTE))$(ARGQUOTE)
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
203 - $(FOREACH) $(TIT) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
204 - $(FOREACH) $(MISC_DIC) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
205 - $(FOREACH) $(TIT:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
206 - $(FOREACH) $(MISC_DIC:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
207 - $(DEL) leim-list.el
210 - $(DELTREE) $(SUBDIRS)
211 - $(DEL) stamp-subdir
213 maintainer-clean: distclean
214 - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
216 extraclean: maintainer-clean
217 - $(FOREACH) *~ "#*" $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)