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.
5 # This file is part of GNU Emacs.
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)
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.
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.
24 # Where to install LEIM files.
25 INSTALLDIR=$(INSTALL_DIR)/leim
27 # On Xenix and the IBM RS6000, double-dot gets screwed up.
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
34 buildlisppath=$(CURDIR)/$(dot)$(dot)/lisp
37 RUN_EMACS = "$(BUILT_EMACS)" -batch --no-init-file --no-site-file --multibyte
39 # Set EMACSLOADPATH correctly (already defined in environment).
40 EMACSLOADPATH=$(buildlisppath)
42 # Subdirectories to be made if $(srcdir) is different from the current
46 # Files generated from TIT dictionaries for Chinese GB character set.
54 # Files generated from TIT dictionaries for Chinese BIG5 character set.
65 CHINESE_TIT=$(TIT_GB) $(TIT_BIG5)
67 NON_TIT_GB=$(srcdir)/quail/py-punct.elc
69 NON_TIT_BIG5=$(srcdir)/quail/pypunct-b5.elc
71 CHINESE_NON_TIT=$(NON_TIT_GB) $(NON_TIT_BIG5)
73 CHINESE_GB=$(TIT_GB) $(NON_TIT_GB)
75 CHINESE_BIG5=$(TIT_BIG5) $(NON_TIT_BIG5)
77 JAPANESE=$(srcdir)/quail/japanese.elc $(srcdir)/ja-dic/ja-dic.elc
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
86 THAI=$(srcdir)/quail/thai.elc
88 VIETNAMESE=$(srcdir)/quail/viqr.elc $(srcdir)/quail/vntelex.elc
90 LAO=$(srcdir)/quail/lao.elc $(srcdir)/quail/lrt.elc
92 INDIAN=$(srcdir)/quail/indian.elc
94 TIBETAN=$(srcdir)/quail/tibetan.elc
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 $(srcdir)/quail/welsh.elc
102 UNICODE=$(srcdir)/quail/sgml-input.elc \
103 $(srcdir)/quail/rfc1345.elc \
104 $(srcdir)/quail/uni-input.elc
107 $(srcdir)/quail/czech.elc \
108 $(srcdir)/quail/slovak.elc
110 GREEK=$(srcdir)/quail/greek.elc
112 RUSSIAN=$(srcdir)/quail/cyrillic.elc $(srcdir)/quail/cyril-jis.elc
115 $(srcdir)/quail/ethiopic.elc \
116 $(srcdir)/quail/ipa.elc \
117 $(srcdir)/quail/hebrew.elc \
118 $(srcdir)/quail/georgian.elc
123 quail/tsang-cns.elc \
124 quail/quick-cns.elc \
130 CHINESE=$(CHINESE_GB) $(CHINESE_BIG5)
131 EASTASIA=$(CHINESE) $(JAPANESE) $(KOREAN)
132 ASIA=$(EASTASIA) $(THAI) $(VIETNAMESE) $(LAO) $(INDIAN) $(TIBETAN)
133 EUROPEAN=$(LATIN) $(SLAVIC) $(GREEK) $(RUSSIAN)
134 WORLD=$(ASIA) $(EUROPEAN) $(MISC) $(MISC_DIC) $(UNICODE)
137 NON_TIT=$(CHINESE_NON_TIT) $(JAPANESE) $(KOREAN) $(EUROPEAN) $(MISC)
142 $(RUN_EMACS) -f batch-byte-compile $<
144 all: $(BUILT_EMACS) $(SUBDIRS) $(TIT) $(MISC_DIC) leim-list.el
146 # To ensure that we can run Emacs. This target is ignored (never
147 # being hit) if a user changes default value of EMACS.
148 $(dot)$(dot)/src/emacs:
149 cd ../src; $(MAKE) $(MFLAGS) emacs
153 echo stamp>stamp-subdir
155 # The rules which generate $(TIT) and ${MISC_DIC) files create them all
156 # in one go. So we need to prevent parallel execution for that target,
157 # otherwise Emacs complains about files being locked. .NOTPARALLEL is
158 # for GNU Make, .NO_PARALLEL is for other Make's.
159 .NOTPARALLEL: $(TIT) $(MISC_DIC)
161 .NO_PARALLEL: $(TIT) $(MISC_DIC)
163 # Rule to generate quail/*.el from CXTERM-DIC/*.tit.
165 $(RUN_EMACS) -l $(buildlisppath)/international/titdic-cnv \
166 --eval $(ARGQUOTE)(batch-titdic-convert t)$(ARGQUOTE) \
167 -dir quail $(srcdir)/CXTERM-DIC
168 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
169 -f batch-byte-compile $(TIT:.elc=.el)
171 # Rule to generate quail/*.el from MISC_DIC/*.tit.
173 $(RUN_EMACS) -l $(buildlisppath)/international/titdic-cnv \
174 -f batch-miscdic-convert -dir quail $(srcdir)/MISC-DIC
175 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
176 -f batch-byte-compile $(MISC_DIC:.elc=.el)
178 leim-list.el: $(SUBDIRS) $(WORLD)
179 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
180 --eval $(ARGQUOTE)(update-leim-list-file $(DQUOTE).$(DQUOTE))$(ARGQUOTE)
183 - mkdir "$(INSTALLDIR)"
184 - $(DEL) same-dir.tst
185 - $(DEL) $(INSTALL_DIR)/same-dir.tst
186 echo SameDirTest > $(INSTALL_DIR)/same-dir.tst
187 $(IFNOTSAMEDIR) $(CP) leim-list.el $(INSTALLDIR) $(ENDIF)
188 $(IFNOTSAMEDIR) $(CP_DIR) quail $(INSTALLDIR) $(ENDIF)
189 $(IFNOTSAMEDIR) $(CP_DIR) ja-dic $(INSTALLDIR) $(ENDIF)
190 - $(DEL) $(INSTALL_DIR)/same-dir.tst
193 - $(FOREACH) $(TIT) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
194 - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
195 - $(FOREACH) $(MISC_DIC) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
196 - $(FOREACH) $(TIT:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
197 - $(FOREACH) $(MISC_DIC:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
198 - $(DEL) leim-list.el
200 distclean maintainer-clean:
201 if exist stamp-subdir $(DELTREE) $(SUBDIRS)
202 - $(DEL) stamp-subdir