PageRenderTime 1716ms CodeModel.GetById 28ms RepoModel.GetById 1ms app.codeStats 0ms

/leim/Makefile.in

https://bitbucket.org/rev22/progressive-gc-emacsen
Autoconf | 293 lines | 199 code | 59 blank | 35 comment | 26 complexity | 3cd8678af93faa96f45c6798c4bcaa80 MD5 | raw file
Possible License(s): GPL-3.0, LGPL-2.0, AGPL-3.0
  1. # Makefile for leim subdirectory in GNU Emacs.
  2. # Copyright (C) 1997-2012 Free Software Foundation, Inc.
  3. # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
  4. # 2006, 2007, 2008, 2009, 2010, 2011
  5. # National Institute of Advanced Industrial Science and Technology (AIST)
  6. # Registration Number H14PRO021
  7. # This file is part of GNU Emacs.
  8. # GNU Emacs is free software: you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation, either version 3 of the License, or
  11. # (at your option) any later version.
  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. # You should have received a copy of the GNU General Public License
  17. # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  18. # Avoid trouble on systems where the `SHELL' variable might be
  19. # inherited from the environment.
  20. SHELL = /bin/sh
  21. # Here are the things that we expect ../configure to edit.
  22. version=@version@
  23. prefix=@prefix@
  24. datarootdir=@datarootdir@
  25. datadir=@datadir@
  26. srcdir=@srcdir@
  27. ns_appresdir=@ns_appresdir@
  28. # Where to install LEIM files.
  29. INSTALLDIR=$(DESTDIR)${datadir}/emacs/${version}/leim
  30. GZIP_PROG = @GZIP_PROG@
  31. # Which Emacs to use to convert TIT files to Emacs Lisp files,
  32. # byte-compile Emacs Lisp files, and generate the file leim-list.el.
  33. BUILT_EMACS = ../src/emacs
  34. buildlisppath=${srcdir}/../lisp
  35. # How to run Emacs.
  36. RUN_EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \
  37. ${BUILT_EMACS} -batch --no-site-file --no-site-lisp
  38. # Subdirectories to be made if ${srcdir} is different from the current
  39. # directory.
  40. SUBDIRS=quail
  41. # Files generated from TIT dictionaries for Chinese GB character set.
  42. TIT_GB=\
  43. quail/CCDOSPY.elc \
  44. quail/Punct.elc \
  45. quail/QJ.elc \
  46. quail/SW.elc \
  47. quail/TONEPY.elc
  48. # Files generated from TIT dictionaries for Chinese BIG5 character set.
  49. TIT_BIG5=\
  50. quail/4Corner.elc \
  51. quail/ARRAY30.elc \
  52. quail/ECDICT.elc \
  53. quail/ETZY.elc \
  54. quail/Punct-b5.elc \
  55. quail/PY-b5.elc \
  56. quail/QJ-b5.elc \
  57. quail/ZOZY.elc
  58. CHINESE_TIT=${TIT_GB} ${TIT_BIG5}
  59. NON_TIT_GB=${srcdir}/quail/py-punct.elc
  60. NON_TIT_BIG5=${srcdir}/quail/pypunct-b5.elc
  61. CHINESE_NON_TIT=${NON_TIT_GB} ${NON_TIT_BIG5}
  62. CHINESE_GB=${TIT_GB} ${NON_TIT_GB}
  63. CHINESE_BIG5=${TIT_BIG5} ${NON_TIT_BIG5}
  64. JAPANESE=${srcdir}/quail/japanese.elc ${srcdir}/ja-dic/ja-dic.elc
  65. KOREAN= ${srcdir}/quail/hangul.elc \
  66. ${srcdir}/quail/hanja.elc \
  67. ${srcdir}/quail/hanja3.elc \
  68. ${srcdir}/quail/hanja-jis.elc \
  69. ${srcdir}/quail/symbol-ksc.elc
  70. THAI=${srcdir}/quail/thai.elc
  71. VIETNAMESE=${srcdir}/quail/viqr.elc ${srcdir}/quail/vntelex.elc
  72. LAO=${srcdir}/quail/lao.elc ${srcdir}/quail/lrt.elc
  73. INDIAN=${srcdir}/quail/indian.elc
  74. TIBETAN=${srcdir}/quail/tibetan.elc
  75. LATIN= ${srcdir}/quail/latin-pre.elc \
  76. ${srcdir}/quail/latin-post.elc \
  77. ${srcdir}/quail/latin-alt.elc \
  78. ${srcdir}/quail/latin-ltx.elc \
  79. ${srcdir}/quail/welsh.elc
  80. UNICODE=${srcdir}/quail/sgml-input.elc ${srcdir}/quail/rfc1345.elc \
  81. ${srcdir}/quail/uni-input.elc
  82. SLAVIC= \
  83. ${srcdir}/quail/czech.elc \
  84. ${srcdir}/quail/croatian.elc \
  85. ${srcdir}/quail/slovak.elc
  86. GREEK=${srcdir}/quail/greek.elc
  87. RUSSIAN=${srcdir}/quail/cyrillic.elc ${srcdir}/quail/cyril-jis.elc
  88. OTHERS= \
  89. ${srcdir}/quail/arabic.elc \
  90. ${srcdir}/quail/ethiopic.elc \
  91. ${srcdir}/quail/ipa.elc \
  92. ${srcdir}/quail/ipa-praat.elc \
  93. ${srcdir}/quail/hebrew.elc \
  94. ${srcdir}/quail/georgian.elc \
  95. $(srcdir)/quail/persian.elc \
  96. ${srcdir}/quail/sisheng.elc
  97. MISC= \
  98. quail/tsang-b5.elc \
  99. quail/quick-b5.elc \
  100. quail/tsang-cns.elc \
  101. quail/quick-cns.elc \
  102. quail/PY.elc \
  103. quail/ZIRANMA.elc \
  104. quail/CTLau.elc \
  105. quail/CTLau-b5.elc
  106. CHINESE=${CHINESE_GB} ${CHINESE_BIG5}
  107. EASTASIA=${CHINESE} ${JAPANESE} ${KOREAN}
  108. ASIA=${EASTASIA} ${THAI} ${VIETNAMESE} ${LAO} ${INDIAN} ${TIBETAN}
  109. EUROPEAN=${LATIN} ${SLAVIC} ${GREEK} ${RUSSIAN}
  110. WORLD=${ASIA} ${EUROPEAN} ${OTHERS} ${MISC} ${UNICODE}
  111. TIT_MISC=${CHINESE_TIT} ${MISC}
  112. NON_TIT_MISC=${CHINESE_NON_TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${OTHERS}
  113. .SUFFIXES: .elc .el
  114. .el.elc:
  115. @echo Compiling $<
  116. @${RUN_EMACS} -f batch-byte-compile $<
  117. all: ${BUILT_EMACS} ${SUBDIRS} leim-list.el ${WORLD}
  118. # To ensure that we can run Emacs. This target is ignored (never
  119. # being hit) if a user changes default value of EMACS.
  120. ../src/emacs:
  121. cd ../src; ${MAKE} ${MFLAGS} emacs
  122. ${SUBDIRS}:
  123. mkdir $@
  124. touch stamp-subdir
  125. TIT_SOURCES= \
  126. ${srcdir}/CXTERM-DIC/4Corner.tit \
  127. ${srcdir}/CXTERM-DIC/ARRAY30.tit \
  128. ${srcdir}/CXTERM-DIC/CCDOSPY.tit \
  129. ${srcdir}/CXTERM-DIC/ECDICT.tit \
  130. ${srcdir}/CXTERM-DIC/ETZY.tit \
  131. ${srcdir}/CXTERM-DIC/PY-b5.tit \
  132. ${srcdir}/CXTERM-DIC/Punct-b5.tit \
  133. ${srcdir}/CXTERM-DIC/Punct.tit \
  134. ${srcdir}/CXTERM-DIC/QJ-b5.tit \
  135. ${srcdir}/CXTERM-DIC/QJ.tit \
  136. ${srcdir}/CXTERM-DIC/SW.tit \
  137. ${srcdir}/CXTERM-DIC/TONEPY.tit \
  138. ${srcdir}/CXTERM-DIC/ZOZY.tit
  139. ${CHINESE_TIT:.elc=.el}: changed.tit
  140. @true
  141. changed.tit: ${TIT_SOURCES}
  142. ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \
  143. -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \
  144. echo "changed" > $@
  145. MISC_SOURCES= \
  146. ${srcdir}/MISC-DIC/CTLau-b5.html \
  147. ${srcdir}/MISC-DIC/CTLau.html \
  148. ${srcdir}/MISC-DIC/cangjie-table.b5 \
  149. ${srcdir}/MISC-DIC/cangjie-table.cns \
  150. ${srcdir}/MISC-DIC/pinyin.map \
  151. ${srcdir}/MISC-DIC/ziranma.cin
  152. ${MISC:.elc=.el}: changed.misc
  153. @true
  154. changed.misc: ${MISC_SOURCES}
  155. ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \
  156. -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \
  157. echo "changed" > $@
  158. leim-list.el: ${SUBDIRS} ${TIT_MISC} changed.tit changed.misc ${srcdir}/leim-ext.el
  159. rm -f leim-list.el
  160. ${RUN_EMACS} -l ${buildlisppath}/international/quail \
  161. -f batch-byte-compile-if-not-done ${TIT_MISC:.elc=.el}
  162. if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
  163. ${RUN_EMACS} -l ${buildlisppath}/international/quail \
  164. --eval "(update-leim-list-file \".\")" ; \
  165. else \
  166. ${RUN_EMACS} -l ${buildlisppath}/international/quail \
  167. --eval "(update-leim-list-file \".\" \"${srcdir}\")" ; \
  168. fi
  169. sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
  170. MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done
  171. install: all
  172. if [ ! -d ${INSTALLDIR} ] ; then \
  173. umask 022; ${srcdir}/../build-aux/install-sh -d ${INSTALLDIR}; \
  174. else true; fi
  175. if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
  176. rm -f ${INSTALLDIR}/leim-list.el; \
  177. rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
  178. echo "Copying leim files to ${INSTALLDIR} ..." ; \
  179. if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
  180. tar -chf - leim-list.el quail ja-dic \
  181. | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
  182. else \
  183. tar -chf - leim-list.el quail \
  184. | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
  185. cd ${srcdir}; \
  186. tar -chf - quail/* ja-dic \
  187. | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
  188. fi; \
  189. rm -f ${INSTALLDIR}/.gitignore ${INSTALLDIR}/*/.gitignore; \
  190. rm -f ${INSTALLDIR}/.arch-inventory ${INSTALLDIR}/*/.arch-inventory; \
  191. rm -f ${INSTALLDIR}/\#* ${INSTALLDIR}/*/\#* ; \
  192. rm -f ${INSTALLDIR}/.\#* ${INSTALLDIR}/*/.\#* ; \
  193. rm -f ${INSTALLDIR}/*~ ${INSTALLDIR}/*/*~ ; \
  194. rm -f ${INSTALLDIR}/*.orig ${INSTALLDIR}/*/*.orig ; \
  195. else true; fi
  196. -unset CDPATH; \
  197. if [ -n "${GZIP_PROG}" ]; \
  198. then \
  199. echo "Compressing *.el ..." ; \
  200. (cd ${INSTALLDIR}; for f in `find . -name "*.elc" -print`; do \
  201. ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
  202. done) \
  203. else true; fi
  204. -chmod -R a+r ${INSTALLDIR}
  205. for installuser in $${LOGNAME} $${USERNAME} $${USER} \
  206. `id -un 2> /dev/null`; do \
  207. [ -n "$${installuser}" ] && break ; \
  208. done ; \
  209. find ${INSTALLDIR} -exec chown $${installuser} '{}' ';'
  210. if [ "${ns_appresdir}" != "" ]; then \
  211. ( cd ${ns_appresdir} ; \
  212. if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\
  213. rm -fr share ) ; \
  214. else true ; fi
  215. clean mostlyclean:
  216. rm -f ${TIT_MISC} ${TIT_MISC:.elc=.el} \
  217. leim-list.el changed.tit changed.misc
  218. # The following target is needed because the `clean' target only removes
  219. # TIT-generated files and doesn't touch compiled Quail packages. But
  220. # bootstrapping should not leave non-fresh .elc files behind.
  221. bootstrap-clean: clean
  222. rm -f ${WORLD}
  223. ## FIXME some compiled files go to srcdir, some don't?
  224. # cd ${srcdir}; rm -f *.elc */*.elc
  225. distclean: clean
  226. if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi
  227. rm -f Makefile
  228. maintainer-clean: distclean bootstrap-clean
  229. extraclean: maintainer-clean
  230. -rm -f *~ \#* */*~ */\#*
  231. .PHONY: check-declare
  232. check-declare:
  233. $(RUN_EMACS) -l $(buildlisppath)/emacs-lisp/check-declare \
  234. --eval '(check-declare-directory "$(srcdir)")'