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 = $(dot)$(dot)/src/$(BLD)/emacs.exe
34 buildlisppath=$(dot)$(dot)/lisp
37 RUN_EMACS = "$(BUILT_EMACS)" -batch --no-init-file --no-site-file --multibyte
39 # Subdirectories to be made if $(srcdir) is different from the current
43 # Files generated from TIT dictionaries for Chinese GB character set.
54 # 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/quick-b5.elc $(srcdir)/quail/tsang-b5.elc \
71 $(srcdir)/quail/pypunct-b5.elc
73 NON_TIT_CNS=$(srcdir)/quail/quick-cns.elc $(srcdir)/quail/tsang-cns.elc
75 CHINESE_NON_TIT=$(NON_TIT_GB) $(NON_TIT_BIG5) $(NON_TIT_CNS)
77 CHINESE_GB=$(TIT_GB) $(NON_TIT_GB)
79 CHINESE_BIG5=$(TIT_BIG5) $(NON_TIT_BIG5)
81 CHINESE_CNS=$(NON_TIT_CNS)
83 JAPANESE=$(srcdir)/quail/japanese.elc $(srcdir)/ja-dic/ja-dic.elc
85 KOREAN= $(srcdir)/quail/hangul.elc \
86 $(srcdir)/quail/hangul3.elc \
87 $(srcdir)/quail/hanja.elc \
88 $(srcdir)/quail/hanja-jis.elc \
89 $(srcdir)/quail/symbol-ksc.elc
91 THAI=$(srcdir)/quail/thai.elc
93 VIETNAMESE=$(srcdir)/quail/viqr.elc
95 LAO=$(srcdir)/quail/lao.elc $(srcdir)/quail/lrt.elc
97 INDIAN=$(srcdir)/quail/devanagari.elc
99 TIBETAN=$(srcdir)/quail/tibetan.elc
101 LATIN=$(srcdir)/quail/latin-pre.elc $(srcdir)/quail/latin-post.elc
104 $(srcdir)/quail/czech.elc \
105 $(srcdir)/quail/slovak.elc
107 GREEK=$(srcdir)/quail/greek.elc
109 RUSSIAN=$(srcdir)/quail/cyrillic.elc $(srcdir)/quail/cyril-jis.elc
112 $(srcdir)/quail/ethiopic.elc \
113 $(srcdir)/quail/ipa.elc \
114 $(srcdir)/quail/hebrew.elc
116 CHINESE=$(CHINESE_GB) $(CHINESE_BIG5) $(CHINESE_CNS)
117 EASTASIA=$(CHINESE) $(JAPANESE) $(KOREAN)
118 ASIA=$(EASTASIA) $(THAI) $(VIETNAMESE) $(LAO) $(INDIAN) $(TIBETAN)
119 EUROPEAN=$(LATIN) $(SLAVIC) $(GREEK) $(RUSSIAN)
120 WORLD=$(ASIA) $(EUROPEAN) $(MISC)
123 NON_TIT=$(CHINESE_NON_TIT) $(JAPANESE) $(KOREAN) $(EUROPEAN) $(MISC)
125 all: $(BUILT_EMACS) $(SUBDIRS) $(TIT) leim-list.el
127 # To ensure that we can run Emacs. This target is ignored (never
128 # being hit) if a user changes default value of EMACS.
129 $(dot)$(dot)/src/emacs:
130 cd ../src; $(MAKE) $(MFLAGS) emacs
134 echo stamp>stamp-subdir
136 # Rule to generate quail/*.el from CXTERM-DIC/*.tit.
138 set EMACSLOADPATH=$(buildlisppath)
139 $(SETLOADPATH) $(RUN_EMACS) -l $(buildlisppath)/international/titdic-cnv \
140 --eval $(ARGQUOTE)(batch-titdic-convert t)$(ARGQUOTE) -dir quail $(srcdir)/CXTERM-DIC
141 $(SETLOADPATH) $(RUN_EMACS) -l $(buildlisppath)/international/quail \
142 -f batch-byte-compile $(TIT:.elc=.el)
147 set EMACSLOADPATH=$(buildlisppath)
148 $(SETLOADPATH) $(RUN_EMACS) -f batch-byte-compile $<
150 leim-list.el: $(SUBDIRS) $(WORLD)
151 set EMACSLOADPATH=$(buildlisppath)
152 $(SETLOADPATH) $(RUN_EMACS) -l $(buildlisppath)/international/quail \
153 --eval $(ARGQUOTE)(update-leim-list-file $(DQUOTE).$(DQUOTE))$(ARGQUOTE)
156 - mkdir "$(INSTALLDIR)"
157 - $(DEL) same-dir.tst
158 - $(DEL) $(INSTALL_DIR)/same-dir.tst
159 echo SameDirTest > $(INSTALL_DIR)/same-dir.tst
160 $(IFNOTSAMEDIR) $(CP) leim-list.el $(INSTALLDIR) $(ENDIF)
161 $(IFNOTSAMEDIR) $(CP_DIR) quail $(INSTALLDIR) $(ENDIF)
162 $(IFNOTSAMEDIR) $(CP_DIR) ja-dic $(INSTALLDIR) $(ENDIF)
163 - $(DEL) $(INSTALL_DIR)/same-dir.tst
166 - $(FOREACH) $(TIT) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
167 - $(FOREACH) $(TIT:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
168 - $(DEL) leim-list.el
170 distclean maintainer-clean:
171 if exist stamp-subdir $(DELTREE) $(SUBDIRS)
172 - $(DEL) stamp-subdir