(.SUFFIXES): New target, include .elc .el.
[bpt/emacs.git] / leim / makefile.nt
CommitLineData
b37434d3
GM
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#
23# Sets up the system dependent macros.
24#
25!include ..\nt\makefile.def
26
27srcdir=.
28
29# Where to install LEIM files.
30INSTALLDIR=$(INSTALL_DIR)\leim
31
32# On Xenix and the IBM RS6000, double-dot gets screwed up.
33dot = .
34
35# Which Emacs to use to convert TIT files to Emacs Lisp files,
36# byte-compile Emacs Lisp files, and generate the file leim-list.el.
37BUILT_EMACS = $(dot)$(dot)\src\$(BLD)\emacs.exe
38
39buildlisppath=$(dot)$(dot)/lisp
40
41# How to run Emacs.
42RUN_EMACS = $(BUILT_EMACS) -batch --no-init-file --no-site-file --multibyte
43
44# Subdirectories to be made if $(srcdir) is different from the current
45# directory.
46SUBDIRS=quail
47
48# Files generated from TIT dictionaries for Chinese GB character set.
49TIT_GB=\
e44c759d
AI
50 quail/CTLau.elc \
51 quail/CCDOSPY.elc \
52 quail/Punct.elc \
53 quail/PY.elc \
54 quail/QJ.elc \
55 quail/SW.elc \
56 quail/TONEPY.elc \
57 quail/ZIRANMA.elc
b37434d3
GM
58
59# Files generated from TIT dictionaries for Chinese BIG5 character set.
60TIT_BIG5=\
e44c759d
AI
61 quail/4Corner.elc \
62 quail/ARRAY30.elc \
63 quail/CTLauB.elc \
64 quail/ECDICT.elc \
65 quail/ETZY.elc \
66 quail/Punct-b5.elc \
67 quail/PY-b5.elc \
68 quail/QJ-b5.elc \
69 quail/ZOZY.elc
b37434d3
GM
70
71CHINESE_TIT=$(TIT_GB) $(TIT_BIG5)
72
e44c759d 73NON_TIT_GB=$(srcdir)/quail/py-punct.elc
b37434d3 74
e44c759d
AI
75NON_TIT_BIG5=$(srcdir)/quail/quick-b5.elc $(srcdir)/quail/tsang-b5.elc \
76 $(srcdir)/quail/pypunct-b5.elc
b37434d3 77
e44c759d 78NON_TIT_CNS=$(srcdir)/quail/quick-cns.elc $(srcdir)/quail/tsang-cns.elc
b37434d3
GM
79
80CHINESE_NON_TIT=$(NON_TIT_GB) $(NON_TIT_BIG5) $(NON_TIT_CNS)
81
82CHINESE_GB=$(TIT_GB) $(NON_TIT_GB)
83
84CHINESE_BIG5=$(TIT_BIG5) $(NON_TIT_BIG5)
85
86CHINESE_CNS=$(NON_TIT_CNS)
87
e44c759d 88JAPANESE=$(srcdir)/quail/japanese.elc $(srcdir)/ja-dic/ja-dic.elc
b37434d3 89
e44c759d
AI
90KOREAN= $(srcdir)/quail/hangul.elc \
91 $(srcdir)/quail/hangul3.elc \
92 $(srcdir)/quail/hanja.elc \
93 $(srcdir)/quail/hanja-jis.elc \
94 $(srcdir)/quail/symbol-ksc.elc
b37434d3 95
e44c759d 96THAI=$(srcdir)/quail/thai.elc
b37434d3 97
e44c759d 98VIETNAMESE=$(srcdir)/quail/viqr.elc
b37434d3 99
e44c759d 100LAO=$(srcdir)/quail/lao.elc $(srcdir)/quail/lrt.elc
b37434d3 101
e44c759d 102INDIAN=$(srcdir)/quail/devanagari.elc
b37434d3 103
e44c759d 104TIBETAN=$(srcdir)/quail/tibetan.elc
b37434d3 105
e44c759d 106LATIN=$(srcdir)/quail/latin-pre.elc $(srcdir)/quail/latin-post.elc
b37434d3
GM
107
108SLAVIC= \
e44c759d
AI
109 $(srcdir)/quail/czech.elc \
110 $(srcdir)/quail/slovak.elc
b37434d3 111
e44c759d 112GREEK=$(srcdir)/quail/greek.elc
b37434d3 113
e44c759d 114RUSSIAN=$(srcdir)/quail/cyrillic.elc $(srcdir)/quail/cyril-jis.elc
b37434d3
GM
115
116MISC= \
e44c759d
AI
117 $(srcdir)/quail/ethiopic.elc \
118 $(srcdir)/quail/ipa.elc \
119 $(srcdir)/quail/hebrew.elc
b37434d3
GM
120
121CHINESE=$(CHINESE_GB) $(CHINESE_BIG5) $(CHINESE_CNS)
122EASTASIA=$(CHINESE) $(JAPANESE) $(KOREAN)
123ASIA=$(EASTASIA) $(THAI) $(VIETNAMESE) $(LAO) $(INDIAN) $(TIBETAN)
124EUROPEAN=$(LATIN) $(SLAVIC) $(GREEK) $(RUSSIAN)
125WORLD=$(ASIA) $(EUROPEAN) $(MISC)
126
127TIT=$(CHINESE_TIT)
128NON_TIT=$(CHINESE_NON_TIT) $(JAPANESE) $(KOREAN) $(EUROPEAN) $(MISC)
129
130all: $(BUILT_EMACS) $(SUBDIRS) $(TIT) leim-list.el
131
132# To ensure that we can run Emacs. This target is ignored (never
133# being hit) if a user changes default value of EMACS.
134$(dot)$(dot)/src/emacs:
135 cd ../src; $(MAKE) $(MFLAGS) emacs
136
137$(SUBDIRS):
138 mkdir $@
139 echo stamp>stamp-subdir
b37434d3
GM
140
141# Rule to generate quail/*.el from CXTERM-DIC/*.tit.
e44c759d 142$(TIT): $(SUBDIRS)
45e5607f 143 set EMACSLOADPATH=$(buildlisppath)
b37434d3
GM
144 $(RUN_EMACS) -l $(buildlisppath)/international/titdic-cnv \
145 --eval "(batch-titdic-convert t)" -dir quail $(srcdir)/CXTERM-DIC
146 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
147 -f batch-byte-compile $(TIT)
148
24c53d36
AI
149.SUFFIXES: .elc .el
150
e44c759d
AI
151.el.elc:
152 set EMACSLOADPATH=$(buildlisppath)
153 $(RUN_EMACS) -f batch-byte-compile $<
154
b37434d3 155leim-list.el: $(SUBDIRS) $(WORLD)
45e5607f 156 set EMACSLOADPATH=$(buildlisppath)
b37434d3
GM
157 $(RUN_EMACS) -l $(buildlisppath)/international/quail \
158 --eval "(update-leim-list-file \".\")"
159
160install: all
161 - mkdir $(INSTALLDIR)
162 - $(DEL) same-dir.tst
163 - $(DEL) $(INSTALLDIR)\same-dir.tst
164 echo SameDirTest > $(INSTALLDIR)\same-dir.tst
165 if not exist same-dir.tst $(CP) leim-list.el $(INSTALLDIR)
b37434d3 166 if not exist same-dir.tst $(CP_DIR) quail $(INSTALLDIR)\quail
7b273f2f 167 if not exist same-dir.tst $(CP_DIR) ja-dic $(INSTALLDIR)\ja-dic
b37434d3
GM
168 - $(DEL) $(INSTALLDIR)\same-dir.tst
169
170clean mostlyclean:
171 for %%f in ($(TIT:/=\)) do $(DEL) %%fc
172 for %%f in ($(TIT:/=\)) do $(DEL) %%f
173 $(DEL) leim-list.el
174
175distclean maintainer-clean:
176 if exist stamp-subdir $(DELTREE) $(SUBDIRS)
177 $(DEL) stamp-subdir