Makefile.in 4.66 KB
Newer Older
1
### @configure_input@
2

Paul Eggert's avatar
Paul Eggert committed
3
# Copyright (C) 1997-2019 Free Software Foundation, Inc.
Glenn Morris's avatar
Glenn Morris committed
4
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
5
#   2006, 2007, 2008, 2009, 2010, 2011
Kenichi Handa's avatar
Kenichi Handa committed
6 7
#   National Institute of Advanced Industrial Science and Technology (AIST)
#   Registration Number H14PRO021
Kenichi Handa's avatar
Kenichi Handa committed
8

9 10
# This file is part of GNU Emacs.

11
# GNU Emacs is free software: you can redistribute it and/or modify
12
# it under the terms of the GNU General Public License as published by
13 14 15
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

16 17 18 19
# 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.
20

21
# You should have received a copy of the GNU General Public License
22
# along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
23

24
SHELL = @SHELL@
25 26 27

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

29 30 31
# Where the generated files go.
leimdir = ${srcdir}/../lisp/leim

32 33
EXEEXT = @EXEEXT@

Paul Eggert's avatar
Paul Eggert committed
34 35 36 37 38 39 40 41 42 43 44 45 46
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@

AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 =

AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =

47 48 49
# Prevent any settings in the user environment causing problems.
unexport EMACSDATA EMACSDOC EMACSPATH

50
# Which Emacs to use to convert TIT files to Emacs Lisp files,
51
# and generate the file leim-list.el.
52
EMACS = ../src/emacs${EXEEXT}
53 54

# How to run Emacs.
55 56
# Prevent any setting of EMACSLOADPATH in user environment causing problems.
RUN_EMACS = EMACSLOADPATH= '$(EMACS)' -batch --no-site-file --no-site-lisp
57

58
MKDIR_P = @MKDIR_P@
59 60

# Files generated from TIT dictionaries for Chinese GB character set.
61
TIT_GB=\
62 63 64 65 66
	${leimdir}/quail/CCDOSPY.el	\
	${leimdir}/quail/Punct.el	\
	${leimdir}/quail/QJ.el		\
	${leimdir}/quail/SW.el		\
	${leimdir}/quail/TONEPY.el
67 68

# Files generated from TIT dictionaries for Chinese BIG5 character set.
69
TIT_BIG5=\
70 71 72 73 74 75 76 77
	${leimdir}/quail/4Corner.el	\
	${leimdir}/quail/ARRAY30.el	\
	${leimdir}/quail/ECDICT.el	\
	${leimdir}/quail/ETZY.el	\
	${leimdir}/quail/Punct-b5.el	\
	${leimdir}/quail/PY-b5.el	\
	${leimdir}/quail/QJ-b5.el	\
	${leimdir}/quail/ZOZY.el
78

Kenichi Handa's avatar
Kenichi Handa committed
79
MISC= \
80 81 82 83 84 85 86
	${leimdir}/quail/tsang-b5.el	\
	${leimdir}/quail/quick-b5.el	\
	${leimdir}/quail/tsang-cns.el	\
	${leimdir}/quail/quick-cns.el	\
	${leimdir}/quail/PY.el		\
	${leimdir}/quail/ZIRANMA.el	\
	${leimdir}/quail/CTLau.el	\
87 88
	${leimdir}/quail/CTLau-b5.el    \
	${srcdir}/../lisp/language/pinyin.el
89

90 91 92
## All the generated .el files.
TIT_MISC = ${TIT_GB} ${TIT_BIG5} ${MISC}

93

94
all: ${leimdir}/leim-list.el ${leimdir}/ja-dic/ja-dic.el
95
.PHONY: all
96

97 98 99 100 101 102 103 104 105 106

## Ensure the output directory exists.
${TIT_MISC}: | ${leimdir}/quail

${leimdir}/quail ${leimdir}/ja-dic:
	${MKDIR_P} $@


## All of TIT_GB and TIT_BIG5.
${leimdir}/quail/%.el: ${srcdir}/CXTERM-DIC/%.tit
Paul Eggert's avatar
Paul Eggert committed
107
	$(AM_V_GEN)${RUN_EMACS} -l titdic-cnv \
108 109 110
	  -f batch-titdic-convert -dir ${leimdir}/quail $<


Paul Eggert's avatar
Paul Eggert committed
111 112
misc_convert = $(AM_V_GEN)${RUN_EMACS} \
  -l titdic-cnv -f batch-miscdic-convert -dir ${leimdir}/quail
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128

## CTLau.el, CTLau-b5.el.
${leimdir}/quail/CT%.el: ${srcdir}/MISC-DIC/CT%.html
	${misc_convert} $<

${leimdir}/quail/PY.el: ${srcdir}/MISC-DIC/pinyin.map
	${misc_convert} $<

${leimdir}/quail/ZIRANMA.el: ${srcdir}/MISC-DIC/ziranma.cin
	${misc_convert} $<

## Processing cangjie-table.b5 and cangjie-table.cns generates two files
## in each case.
${leimdir}/quail/tsang-%.el ${leimdir}/quail/quick-%.el: ${srcdir}/MISC-DIC/cangjie-table.%
	${misc_convert} $<

129 130 131 132

.PHONY: leim-list.el
leim-list.el: ${leimdir}/leim-list.el

133
${leimdir}/leim-list.el: ${srcdir}/leim-ext.el ${TIT_MISC}
Paul Eggert's avatar
Paul Eggert committed
134 135
	$(AM_V_GEN)rm -f $@
	$(AM_V_at)${RUN_EMACS} -l international/quail \
136
	  --eval "(update-leim-list-file (unmsys--file-name \"${leimdir}\"))"
Paul Eggert's avatar
Paul Eggert committed
137
	$(AM_V_at)sed -n -e '/^[^;]/p' -e 's/^;\(;*\)inc /;\1 /p' < $< >> $@
138 139 140


${leimdir}/ja-dic/ja-dic.el: | $(leimdir)/ja-dic
141

142
${leimdir}/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
Paul Eggert's avatar
Paul Eggert committed
143
	$(AM_V_GEN)$(RUN_EMACS) -batch -l ja-dic-cnv \
144 145
	  -f batch-skkdic-convert -dir "$(leimdir)/ja-dic" "$<"

146 147 148
${srcdir}/../lisp/language/pinyin.el: ${srcdir}/MISC-DIC/pinyin.map
	$(AM_V_GEN)${RUN_EMACS} -l titdic-cnv -f pinyin-convert $< $@

149

150
.PHONY: bootstrap-clean distclean maintainer-clean extraclean
151

152
bootstrap-clean:
153
	rm -f ${TIT_MISC} ${leimdir}/leim-list.el
154

155
distclean:
156
	rm -f Makefile
157

158
maintainer-clean: distclean bootstrap-clean
159

160 161
## We do not delete ja-dic, even in a bootstrap, because it rarely
## changes and is slow to regenerate.
162
extraclean: bootstrap-clean
163 164
	rm -rf ${leimdir}/ja-dic

165
### Makefile.in ends here