1 # -*- Makefile -*- for leim subdirectory in GNU Emacs on the Microsoft W32 API.
2 # Copyright (C) 1997, 2004 Electrotechnical Laboratory, JAPAN.
3 # Licensed to the Free Software Foundation.
4 # Copyright (C) 2005, Free Software Foundation, Inc.
6 # This file is part of GNU Emacs.
8 # GNU Emacs is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
13 # GNU Emacs is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Emacs; see the file COPYING. If not, write to the
20 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 # Boston, MA 02110-1301, USA.
25 # Where to install LEIM files.
26 INSTALLDIR=$(INSTALL_DIR)/leim
28 # On Xenix and the IBM RS6000, double-dot gets screwed up.
31 # Which Emacs to use to convert TIT files to Emacs Lisp files,
32 # byte-compile Emacs Lisp files, and generate the file leim-list.el.
33 BUILT_EMACS = $(THISDIR)/$(dot)$(dot)/src/$(BLD)/emacs.exe
35 buildlisppath=$(CURDIR)/$(dot)$(dot)/lisp
38 RUN_EMACS = "$(BUILT_EMACS)" -batch --no-init-file --no-site-file --multibyte
40 # Set EMACSLOADPATH correctly (already defined in environment).
41 EMACSLOADPATH=$(buildlisppath)
43 # Subdirectories to be made if $(srcdir) is different from the current
47 # Files generated from TIT dictionaries for Chinese GB character set.
55 # Files generated from TIT dictionaries for Chinese BIG5 character set.
66 CHINESE_TIT=$(TIT_GB) $(TIT_BIG5)
68 NON_TIT_GB=$(srcdir)/quail/py-punct.elc
70 NON_TIT_BIG5=$(srcdir)/quail/pypunct-b5.elc
72 CHINESE_NON_TIT=$(NON_TIT_GB) $(NON_TIT_BIG5)
74 CHINESE_GB=$(TIT_GB) $(NON_TIT_GB)
76 CHINESE_BIG5=$(TIT_BIG5) $(NON_TIT_BIG5)
78 JAPANESE=$(srcdir)/quail/japanese.elc $(srcdir)/ja-dic/ja-dic.elc
80 KOREAN= $(srcdir)/quail/hangul.elc \
81 $(srcdir)/quail/hangul3.elc \
82 $(srcdir)/quail/hanja.elc \
83 $(srcdir)/quail/hanja3.elc \
84 $(srcdir)/quail/hanja-jis.elc \
85 $(srcdir)/quail/symbol-ksc.elc
87 THAI=$(srcdir)/quail/thai.elc
89 VIETNAMESE=$(srcdir)/quail/viqr.elc $(srcdir)/quail/vntelex.elc
91 LAO=$(srcdir)/quail/lao.elc $(srcdir)/quail/lrt.elc
93 INDIAN=$(srcdir)/quail/indian.elc
95 TIBETAN=$(srcdir)/quail/tibetan.elc
97 LATIN= $(srcdir)/quail/latin-pre.elc \
98 $(srcdir)/quail/latin-post.elc \
99 $(srcdir)/quail/latin-alt.elc \
100 $(srcdir)/quail/latin-ltx.elc \
101 $(srcdir)/quail/welsh.elc
103 UNICODE=$(srcdir)/quail/sgml-input.elc \
104 $(srcdir)/quail/rfc1345.elc \
105 $(srcdir)/quail/uni-input.elc
108 $(srcdir)/quail/czech.elc \
109 $(srcdir)/quail/croatian.elc \
110 $(srcdir)/quail/slovak.elc
112 GREEK=$(srcdir)/quail/greek.elc
114 RUSSIAN=$(srcdir)/quail/cyrillic.elc $(srcdir)/quail/cyril-jis.elc
117 $(srcdir)/quail/ethiopic.elc \
118 $(srcdir)/quail/ipa.elc \
119 $(srcdir)/quail/hebrew.elc \
120 $(srcdir)/quail/georgian.elc
125 quail/tsang-cns.elc \
126 quail/quick-cns.elc \
132 CHINESE=$(CHINESE_GB) $(CHINESE_BIG5)
133 EASTASIA=$(CHINESE) $(JAPANESE) $(KOREAN)
134 ASIA=$(EASTASIA) $(THAI) $(VIETNAMESE) $(LAO) $(INDIAN) $(TIBETAN)
135 EUROPEAN=$(LATIN) $(SLAVIC) $(GREEK) $(RUSSIAN)
136 WORLD=$(ASIA) $(EUROPEAN) $(MISC) $(MISC_DIC) $(UNICODE)
139 NON_TIT=$(CHINESE_NON_TIT) $(JAPANESE) $(KOREAN) $(EUROPEAN) $(MISC)
144 $(RUN_EMACS) -f batch-byte-compile $<
146 all: $(BUILT_EMACS) $(SUBDIRS) $(WORLD) leim-list.el
148 # To ensure that we can run Emacs. This target is ignored (never
149 # being hit) if a user changes default value of EMACS.
150 $(dot)$(dot)/src/emacs:
151 cd ../src; $(MAKE) $(MFLAGS) emacs
155 echo stamp>stamp-subdir
157 # The rules which generate $(TIT) and ${MISC_DIC) files create them all
158 # in one go. So we need to prevent parallel execution for that target,
159 # otherwise Emacs complains about files being locked. .NOTPARALLEL is
160 # for GNU Make, .NO_PARALLEL is for other Make's.
161 .NOTPARALLEL: $(TIT) $(MISC_DIC)
163 .NO_PARALLEL: $(TIT) $(MISC_DIC)
165 # Rule to generate quail/*.el from CXTERM-DIC/*.tit.
167 $(RUN_EMACS) -l $(buildlisppath)/international/titdic-cnv \
168 --eval $(ARGQUOTE)(batch-titdic-convert t)$(ARGQUOTE) \
169 -dir quail $(srcdir)/CXTERM-DIC
170 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
171 -f batch-byte-compile $(TIT:.elc=.el)
173 # Rule to generate quail/*.el from MISC_DIC/*.tit.
175 $(RUN_EMACS) -l $(buildlisppath)/international/titdic-cnv \
176 -f batch-miscdic-convert -dir quail $(srcdir)/MISC-DIC
177 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
178 -f batch-byte-compile $(MISC_DIC:.elc=.el)
180 leim-list.el: $(SUBDIRS) $(WORLD)
181 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
182 --eval $(ARGQUOTE)(update-leim-list-file $(DQUOTE).$(DQUOTE))$(ARGQUOTE)
185 - mkdir "$(INSTALLDIR)"
186 - $(DEL) same-dir.tst
187 - $(DEL) $(INSTALL_DIR)/same-dir.tst
188 echo SameDirTest > $(INSTALL_DIR)/same-dir.tst
189 $(IFNOTSAMEDIR) $(CP) leim-list.el $(INSTALLDIR) $(ENDIF)
190 $(IFNOTSAMEDIR) $(CP_DIR) quail $(INSTALLDIR) $(ENDIF)
191 $(IFNOTSAMEDIR) $(CP_DIR) ja-dic $(INSTALLDIR) $(ENDIF)
192 - $(DEL) $(INSTALL_DIR)/same-dir.tst
195 - $(FOREACH) $(TIT) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
196 - $(FOREACH) $(MISC_DIC) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
197 - $(FOREACH) $(TIT:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
198 - $(FOREACH) $(MISC_DIC:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
199 - $(DEL) leim-list.el
202 - $(DELTREE) $(SUBDIRS)
203 - $(DEL) stamp-subdir
205 maintainer-clean: distclean
206 - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
208 extraclean: maintainer-clean
209 - $(FOREACH) *~ "#*" $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)