1 # Makefile for leim subdirectory in GNU Emacs.
2 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
3 # 2006, 2007, 2008, 2009
4 # Free Software Foundation, Inc.
5 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
6 # 2006, 2007, 2008, 2009
7 # National Institute of Advanced Industrial Science and Technology (AIST)
8 # Registration Number H14PRO021
10 # This file is part of GNU Emacs.
12 # GNU Emacs is free software: you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation, either version 3 of the License, or
15 # (at your option) any later version.
17 # GNU Emacs is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
26 # Avoid trouble on systems where the `SHELL' variable might be
27 # inherited from the environment.
30 # Here are the things that we expect ../configure to edit.
33 datarootdir
=@datarootdir@
36 ns_appresdir
=@ns_appresdir@
38 # Where to install LEIM files.
39 INSTALLDIR
=$(DESTDIR
)${datadir}/emacs
/${version}/leim
41 GZIP_PROG
= @GZIP_PROG@
43 # On IBM RS6000, double-dot gets screwed up.
46 # Which Emacs to use to convert TIT files to Emacs Lisp files,
47 # byte-compile Emacs Lisp files, and generate the file leim-list.el.
48 BUILT-EMACS
= ${dot}${dot}/src
/emacs
50 buildlisppath
=${srcdir}/${dot}${dot}/lisp
53 RUN-EMACS
= EMACSLOADPATH
=$(buildlisppath
) LC_ALL
=C \
54 ${BUILT-EMACS
} -batch
--no-init-file
--no-site-file
--multibyte
56 # Subdirectories to be made if ${srcdir} is different from the current
60 # Files generated from TIT dictionaries for Chinese GB character set.
68 # Files generated from TIT dictionaries for Chinese BIG5 character set.
79 CHINESE-TIT
=${TIT-GB
} ${TIT-BIG5
}
81 NON-TIT-GB
=${srcdir}/quail
/py-punct.elc
83 NON-TIT-BIG5
=${srcdir}/quail
/pypunct-b5.elc
85 CHINESE-NON-TIT
=${NON-TIT-GB
} ${NON-TIT-BIG5
}
87 CHINESE-GB
=${TIT-GB
} ${NON-TIT-GB
}
89 CHINESE-BIG5
=${TIT-BIG5
} ${NON-TIT-BIG5
}
91 JAPANESE
=${srcdir}/quail
/japanese.elc
${srcdir}/ja-dic
/ja-dic.elc
93 KOREAN
= ${srcdir}/quail
/hangul.elc \
94 ${srcdir}/quail
/hanja.elc \
95 ${srcdir}/quail
/hanja3.elc \
96 ${srcdir}/quail
/hanja-jis.elc \
97 ${srcdir}/quail
/symbol-ksc.elc
99 THAI
=${srcdir}/quail
/thai.elc
101 VIETNAMESE
=${srcdir}/quail
/viqr.elc
${srcdir}/quail
/vntelex.elc
103 LAO
=${srcdir}/quail
/lao.elc
${srcdir}/quail
/lrt.elc
105 INDIAN
=${srcdir}/quail
/indian.elc
107 TIBETAN
=${srcdir}/quail
/tibetan.elc
109 LATIN
= ${srcdir}/quail
/latin-pre.elc \
110 ${srcdir}/quail
/latin-post.elc \
111 ${srcdir}/quail
/latin-alt.elc \
112 ${srcdir}/quail
/latin-ltx.elc \
113 ${srcdir}/quail
/welsh.elc
115 UNICODE
=${srcdir}/quail
/sgml-input.elc
${srcdir}/quail
/rfc1345.elc \
116 ${srcdir}/quail
/uni-input.elc
119 ${srcdir}/quail
/czech.elc \
120 ${srcdir}/quail
/croatian.elc \
121 ${srcdir}/quail
/slovak.elc
123 GREEK
=${srcdir}/quail
/greek.elc
125 RUSSIAN
=${srcdir}/quail
/cyrillic.elc
${srcdir}/quail
/cyril-jis.elc
128 ${srcdir}/quail
/arabic.elc \
129 ${srcdir}/quail
/ethiopic.elc \
130 ${srcdir}/quail
/ipa.elc \
131 ${srcdir}/quail
/hebrew.elc \
132 ${srcdir}/quail
/georgian.elc \
133 ${srcdir}/quail
/sisheng.elc
138 quail
/tsang-cns.elc \
139 quail
/quick-cns.elc \
145 CHINESE
=${CHINESE-GB
} ${CHINESE-BIG5
}
146 EASTASIA
=${CHINESE} ${JAPANESE} ${KOREAN}
147 ASIA
=${EASTASIA} ${THAI} ${VIETNAMESE} ${LAO} ${INDIAN} ${TIBETAN}
148 EUROPEAN
=${LATIN} ${SLAVIC} ${GREEK} ${RUSSIAN}
149 WORLD
=${ASIA} ${EUROPEAN} ${OTHERS} ${MISC} ${UNICODE}
151 TIT-MISC
=${CHINESE-TIT
} ${MISC}
152 NON-TIT-MISC
=${CHINESE-NON-TIT
} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${OTHERS}
158 @
${RUN-EMACS
} -f batch-byte-compile
$<
160 all: ${BUILT-EMACS
} ${SUBDIRS} leim-list.el
${WORLD}
162 # To ensure that we can run Emacs. This target is ignored (never
163 # being hit) if a user changes default value of EMACS.
164 ${dot}${dot}/src
/emacs
:
165 cd ..
/src
; ${MAKE} ${MFLAGS} emacs
172 ${srcdir}/CXTERM-DIC
/4Corner.tit \
173 ${srcdir}/CXTERM-DIC
/ARRAY30.tit \
174 ${srcdir}/CXTERM-DIC
/CCDOSPY.tit \
175 ${srcdir}/CXTERM-DIC
/ECDICT.tit \
176 ${srcdir}/CXTERM-DIC
/ETZY.tit \
177 ${srcdir}/CXTERM-DIC
/PY-b5.tit \
178 ${srcdir}/CXTERM-DIC
/Punct-b5.tit \
179 ${srcdir}/CXTERM-DIC
/Punct.tit \
180 ${srcdir}/CXTERM-DIC
/QJ-b5.tit \
181 ${srcdir}/CXTERM-DIC
/QJ.tit \
182 ${srcdir}/CXTERM-DIC
/SW.tit \
183 ${srcdir}/CXTERM-DIC
/TONEPY.tit \
184 ${srcdir}/CXTERM-DIC
/ZOZY.tit
186 ${CHINESE-TIT
:.elc
=.el
}: changed.tit
189 changed.tit
: ${TIT-SOURCES
}
190 ${RUN-EMACS
} -l
${buildlisppath}/international
/titdic-cnv \
191 -f batch-titdic-convert
-dir quail
${srcdir}/CXTERM-DIC
; \
195 ${srcdir}/MISC-DIC
/CTLau-b5.html \
196 ${srcdir}/MISC-DIC
/CTLau.html \
197 ${srcdir}/MISC-DIC
/cangjie-table.b5 \
198 ${srcdir}/MISC-DIC
/cangjie-table.cns \
199 ${srcdir}/MISC-DIC
/pinyin.map \
200 ${srcdir}/MISC-DIC
/ziranma.cin
202 ${MISC
:.elc
=.el
}: changed.misc
205 changed.misc
: ${MISC-SOURCES
}
206 ${RUN-EMACS
} -l
${buildlisppath}/international
/titdic-cnv \
207 -f batch-miscdic-convert
-dir quail
${srcdir}/MISC-DIC
; \
210 leim-list.el
: ${SUBDIRS} ${TIT-MISC
} changed.tit changed.misc
${srcdir}/leim-ext.el
212 ${RUN-EMACS
} -l
${buildlisppath}/international
/quail \
213 -f batch-byte-compile-if-not-done
${TIT-MISC
:.elc
=.el
}
214 if
[ x
`(cd ${srcdir} && /bin/pwd)` = x
`(/bin/pwd)` ] ; then \
215 ${RUN-EMACS
} -l
${buildlisppath}/international
/quail \
216 --eval
"(update-leim-list-file \".\")" ; \
218 ${RUN-EMACS
} -l
${buildlisppath}/international
/quail \
219 --eval
"(update-leim-list-file \".\" \"${srcdir}\")" ; \
221 sed
-n
'/^[^;]/ p' < ${srcdir}/leim-ext.el
>> $@
223 MV_DIRS
= for i in
$$dir; do
rm -fr
$$(basename "$$i") ; mv
"$$i" .
; done
226 if
[ ! -d
${INSTALLDIR} ] ; then \
227 ${srcdir}/${dot}${dot}/mkinstalldirs
${INSTALLDIR}; \
229 if
[ x
`(cd ${INSTALLDIR} && /bin/pwd)` != x
`(/bin/pwd)` ] ; then \
230 rm -rf
${INSTALLDIR}/leim-list.el
; \
231 rm -rf
${INSTALLDIR}/quail
${INSTALLDIR}/ja-dic
; \
232 echo
"Copying leim files to ${INSTALLDIR} ..." ; \
233 if
[ x
`(cd ${srcdir} && /bin/pwd)` = x
`(/bin/pwd)` ] ; then \
234 tar -chf
- leim-list.el quail ja-dic \
235 |
(cd
${INSTALLDIR}; umask
0; tar -xvf
- && cat
> /dev
/null
) ;\
237 tar -chf
- leim-list.el quail \
238 |
(cd
${INSTALLDIR}; umask
0; tar -xvf
- && cat
> /dev
/null
) ;\
240 tar -chf
- quail
/* ja-dic \
241 |
(cd
${INSTALLDIR}; umask
0; tar -xvf
- && cat
> /dev
/null
) ;\
243 rm -rf
${INSTALLDIR}/CVS
${INSTALLDIR}/*/CVS
; \
244 rm -f
${INSTALLDIR}/.cvsignore
${INSTALLDIR}/*/.cvsignore
; \
245 rm -f
${INSTALLDIR}/.arch-inventory
${INSTALLDIR}/*/.arch-inventory
; \
246 rm -f
${INSTALLDIR}/\
#* ${INSTALLDIR}/*/\#* ; \
247 rm -f
${INSTALLDIR}/.\
#* ${INSTALLDIR}/*/.\#* ; \
248 rm -f
${INSTALLDIR}/*~
${INSTALLDIR}/*/*~
; \
249 rm -f
${INSTALLDIR}/*.orig
${INSTALLDIR}/*/*.orig
; \
252 if
[ -n
"${GZIP_PROG}" ]; \
254 echo
"Compressing *.el ..." ; \
255 (cd
${INSTALLDIR}; for f in
`find . -name "*.elc" -print`; do \
256 ${GZIP_PROG} -9n
`echo $$f|sed 's/.elc$$/.el/'` ; \
259 -chmod
-R a
+r
${INSTALLDIR}
260 for installuser in
$${LOGNAME} $${USERNAME} $${USER} \
261 `id -un 2> /dev/null`; do \
262 [ -n
"$${installuser}" ] && break
; \
264 find
${INSTALLDIR} -exec chown
$${installuser} '{}' ';'
265 if
[ "${ns_appresdir}" != "" ]; then \
266 ( cd
${ns_appresdir} ; \
267 if
test -d share
/emacs
; then
dir=share
/emacs
/*/*; $(MV_DIRS
); fi
;\
272 rm -f
${TIT-MISC
} ${TIT-MISC
:.elc
=.el
} \
273 leim-list.el changed.tit changed.misc
275 # The following target is needed because the `clean' target only removes
276 # TIT-generated files and doesn't touch compiled Quail packages. But
277 # bootstrapping should not leave non-fresh .elc files behind.
278 bootstrap-clean
: clean
282 if
test -f stamp-subdir
; then
rm -rf
${SUBDIRS} stamp-subdir
; fi
285 maintainer-clean
: distclean
288 extraclean
: maintainer-clean
289 -rm -f
*~ \
#* m/?*~ s/?*~
291 .PHONY
: check-declare
294 $(RUN-EMACS
) -l
$(buildlisppath
)/emacs-lisp
/check-declare \
295 --eval
'(check-declare-directory "$(srcdir)")'