Makefile.in 9.34 KB
Newer Older
Kenichi Handa's avatar
Kenichi Handa committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
# Makefile for leim subdirectory in GNU Emacs.
# Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
# Licensed to the Free Software Foundation.

# This file is part of GNU Emacs.

# GNU Emacs is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING.  If not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

# Avoid trouble on systems where the `SHELL' variable might be
# inherited from the environment.
SHELL = /bin/sh

# Here are the things that we expect ../configure to edit.
version=@version@
prefix=@prefix@
datadir=@datadir@
srcdir=@srcdir@

32
# Where to install LEIM files.
Kenichi Handa's avatar
Kenichi Handa committed
33 34
INSTALLDIR=${datadir}/emacs/${version}/leim

35 36 37
# On Xenix and the IBM RS6000, double-dot gets screwed up.
dot = .
dotdot = ${dot}${dot}
Kenichi Handa's avatar
Kenichi Handa committed
38

39 40 41
# Which Emacs to use to convert TIT files to Emacs Lisp files,
# byte-compile Emacs Lisp files, and generate the file leim-list.el.
EMACS = ${dot}${dot}/src/emacs
Kenichi Handa's avatar
Kenichi Handa committed
42

43 44 45 46 47 48 49 50
buildlisppath=${srcdir}/${dot}${dot}/lisp

# How to run Emacs.  This forces Emacs to use new Emacs Lisp libraries.
RUN-EMACS = EMACSLOADPATH=${buildlisppath}:${buildlisppath}/international \
	${EMACS}

# Subdirectories to be made if ${srcdir} is different from the current
# directory.
Kenichi Handa's avatar
Kenichi Handa committed
51 52
SUBDIRS=quail skk

53
# Files generated from TIT dictionaries for Chinese GB character set.
54
TIT-GB=\
55 56 57 58 59 60 61 62 63 64
	quail/CTLau.el		\
	quail/CCDOSPY.el	\
	quail/Punct.el		\
	quail/PY.el		\
	quail/QJ.el		\
	quail/SW.el		\
	quail/TONEPY.el		\
	quail/ZIRANMA.el

# Files generated from TIT dictionaries for Chinese BIG5 character set.
65
TIT-BIG5=\
66 67 68 69 70 71 72 73 74
	quail/4Corner.el	\
	quail/ARRAY30.el	\
	quail/CTLauB.el		\
	quail/ECDICT.el		\
	quail/ETZY.el		\
	quail/Punct-b5.el	\
	quail/PY-b5.el		\
	quail/QJ-b5.el		\
	quail/ZOZY.el
75 76

CHINESE-GB=${TIT-GB} \
77
	quail/py-punct.el
78 79

CHINESE-BIG5=${TIT-BIG5} \
80
	quail/quick-b5.el quail/tsangchi-b5.el quail/py-punct-b5.el
81

82
CHINESE-CNS=quail/quick-cns.el	quail/tsangchi-cns.el
Kenichi Handa's avatar
Kenichi Handa committed
83

84
JAPANESE=quail/japanese.el skk/skkdic.el
Kenichi Handa's avatar
Kenichi Handa committed
85

86 87 88 89 90
KOREAN=	quail/hangul.el	\
	quail/hangul3.el	\
	quail/hanja.el		\
	quail/hanja-jis.el	\
	quail/symbol-ksc.el
Kenichi Handa's avatar
Kenichi Handa committed
91

92
THAI=quail/thai.el
Kenichi Handa's avatar
Kenichi Handa committed
93

94
VIETNAMESE=quail/viqr.el
Kenichi Handa's avatar
Kenichi Handa committed
95

96
LAO=quail/lao.el quail/lrt.el
Kenichi Handa's avatar
Kenichi Handa committed
97

98
INDIAN=quail/devanagari.el
Kenichi Handa's avatar
Kenichi Handa committed
99

100
TIBETAN=quail/tibetan.el
Kenichi Handa's avatar
Kenichi Handa committed
101

102
LATIN=quail/latin-pre.el quail/latin-post.el
Kenichi Handa's avatar
Kenichi Handa committed
103

104
GREEK=quail/greek.el
Kenichi Handa's avatar
Kenichi Handa committed
105

106
RUSSIAN=quail/cyrillic.el
Kenichi Handa's avatar
Kenichi Handa committed
107

108
MISC=quail/ethiopic.el quail/ipa.el
Kenichi Handa's avatar
Kenichi Handa committed
109 110 111 112 113 114 115

CHINESE=${CHINESE-GB} ${CHINESE-BIG5} ${CHINESE-CNS}
EASTASIA=${CHINESE} ${JAPANESE} ${KOREAN}
ASIA=${EASTASIA} ${THAI} ${VIETNAMESE} ${LAO} ${INDIAN}
EUROPEAN=${LATIN} ${GREEK} ${RUSSIAN}
WORLD=${ASIA} ${EUROPEAN} ${MISC}

116
all: ${SUBDIRS} ${WORLD} stamp-bytecomp leim-list.el
Kenichi Handa's avatar
Kenichi Handa committed
117

118 119 120 121
# To ensure that we can run Emacs.  This target is ignored (never
# being hit) if a user changes default value of EMACS.
${dot}${dot}/src/emacs:
	cd ../src; ${MAKE} ${MFLAGS} emacs
Kenichi Handa's avatar
Kenichi Handa committed
122

123 124 125
${SUBDIRS}:
	mkdir $@
	touch stamp-subdir
Kenichi Handa's avatar
Kenichi Handa committed
126

127 128 129
# Rule to generate quail/*.el from CXTERM-DIC/*.tit.
${TIT-GB} ${TIT-BIG5}: ${EMACS}
	${RUN-EMACS} -batch -l titdic-cnv --eval '(batch-titdic-convert t)'\
130
		-dir quail ${srcdir}/CXTERM-DIC
Kenichi Handa's avatar
Kenichi Handa committed
131

132 133 134 135
# Emacs Lisp source files not generated from TIT dictionaries are
# distributed as is.  So, we just make symbolic links to them if
# ${srcdir} is different form the current directory.
%.el:
136
	@LN_S@ ${srcdir}/$@ $@
Kenichi Handa's avatar
Kenichi Handa committed
137

138 139 140 141
stamp-bytecomp: ${WORLD} ${EMACS}
	${RUN-EMACS} -batch	--eval '(byte-recompile-directory "quail" 0)'
	if test ! -f skk/skkdic.elc; then \
	  if test -f ${srcdir}/skk/skkdic.elc; then \
142
	    @LN_S@ ${srcdir}/skk/skkdic.elc skk; \
143 144 145
	  else \
	    ${RUN-EMACS} -batch -l skkdic-cnv \
		--eval '(byte-recompile-directory "skk" 0)'; \
146 147
	  fi ; \
	else true ; \
148 149 150 151 152
	fi
	touch stamp-bytecomp

leim-list.el: ${EMACS} ${SUBDIRS} ${WORLD}
	${RUN-EMACS} -batch --eval "(update-leim-list-file \".\")"
Kenichi Handa's avatar
Kenichi Handa committed
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174

# install -- all languages supported by LEIM
#   install-asia -- all Asian languages
#     install-eastasia -- all Each Asian languages
#       install-chinese -- all Chinese Languages
#         install-chinese-gb -- Chinese (GB)
#         install-chinese-big5 -- Chinese (BIG5)
#         install-chinese-cns -- Chinese (CNS)
#       install-japanese -- Japanese
#       install-korean -- Korean (hangul and hanja)
#     install-thai -- Thai
#     install-vietnamese -- Vietnamese
#     install-lao -- Lao
#     install-indian -- Indian (Devanagari script)
#     install-tibetan -- Tibetan (Devanagari)
#   install-european -- all European languages
#     install-latin -- all Latin scripts
#     install-greek -- Greek
#     install-russian -- Russian (cyrillic)
#   install-misc -- Ethiopic and IPA

install: all
175 176
	tar cfh - ${SUBDIRS} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
177

178
install-asia: all
179 180 181
	ELC=`echo ${ASIA} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${ASIA} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
182

183
install-eastasia: all
184 185 186
	ELC=`echo ${EASTASIA} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${EASTASIA} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
187

188
install-chinese: all ${CHINESE}
189 190 191
	ELC=`echo ${CHINESE} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${CHINESE} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
192

193
install-chinese-gb: all ${CHINESE-GB}
194 195 196
	ELC=`echo ${CHINESE-GB} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${CHINESE-GB} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
197

198
install-chinese-big5: all ${CHINESE-BIG5}
199 200 201
	ELC=`echo ${CHINESE-BIG5} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${CHINESE-BIG5} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
202

203
install-chinese-cns: all ${CHINESE-CNS}
204 205 206
	ELC=`echo ${CHINESE-CNS} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${CHINESE-CNS} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
207

208
install-japanese: all ${JAPANESE}
209 210 211
	ELC=`echo ${JAPANESE} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${JAPANESE} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
212

213
install-korean: all ${KOREAN}
214 215 216
	ELC=`echo ${KOREAN} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${KOREAN} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
217

218
install-thai: all ${THAI}
219 220 221
	ELC=`echo ${THAI} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${THAI} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
222

223
install-vietnamese: all ${VIETNAMESE}
224 225 226
	ELC=`echo ${VIETNAMESE} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${VIETNAMESE} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
227

228
install-lao: all ${LAO}
229 230 231
	ELC=`echo ${LAO} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${LAO} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
232

233
install-indian: all ${INDIAN}
234 235 236
	ELC=`echo ${INDIAN} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${INDIAN} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
237

238
install-tibetan: all ${TIBETAN}
239 240 241
	ELC=`echo ${TIBETAN} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${TIBETAN} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
242

243
install-european: all ${EUROPEAN}
244 245 246
	ELC=`echo ${EUROPEAN} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${EUROPEAN} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
247

248
install-latin: all ${LATIN}
249 250 251
	ELC=`echo ${LATIN} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${LATIN} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
252

253
install-greek: all ${GREEK}
254 255 256
	ELC=`echo ${GREEK} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${GREEK} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
257

258
install-russian: all ${RUSSIAN}
259 260 261
	ELC=`echo ${RUSSIAN} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${RUSSIAN} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
Kenichi Handa's avatar
Kenichi Handa committed
262

263
install-misc: all ${MISC}
264 265 266
	ELC=`echo ${MISC} | sed 's/\.el/.elc/g'`; \
	tar cfh - $$ELC ${MISC} | (cd ${INSTALLDIR}; tar xvf -)
	${RUN-EMACS} -batch --eval "(update-leim-list-file \"${INSTALLDIR}\")"
267 268

mostlyclean:
269
	rm -f quail/*.elc stamp-bytecomp
270

271 272 273
# This used to use test -L, but that is not portable.
# If Makefile.in doesn't exist in the build directory
# then it isn't the source directory, so we should delete the file.
274
clean:
275
	rm -rf ${TIT-GB} ${TIT-BIG5} quail/*.elc stamp-bytecomp leim-list.el
276 277 278
# If this is not a dot-srcdir build, then remove the link made to skkdic.elc.
	if test ! -f Makefile.in; then \
	  rm -f skk/skkdic.elc; \
279
	else true; fi
280 281

distclean maintainer-clean: clean
282
	if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi
283
	rm -f Makefile