makefile.w32-in 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. # -*- Makefile -*- for leim subdirectory in GNU Emacs on the Microsoft W32 API.
  2. # Copyright (C) 2000-2012 Free Software Foundation, Inc.
  3. # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
  4. # 2006, 2007
  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. srcdir=.
  19. # Where to install LEIM files.
  20. INSTALLDIR=$(INSTALL_DIR)/leim
  21. # On IBM RS6000, double-dot gets screwed up.
  22. dot = .
  23. # Which Emacs to use to convert TIT files to Emacs Lisp files,
  24. # byte-compile Emacs Lisp files, and generate the file leim-list.el.
  25. BUILT_EMACS = $(THISDIR)/$(dot)$(dot)/src/$(BLD)/emacs.exe
  26. buildlisppath=$(CURDIR)/$(dot)$(dot)/lisp
  27. # How to run Emacs.
  28. RUN_EMACS = "$(BUILT_EMACS)" -batch --no-site-file --no-site-lisp
  29. # Set EMACSLOADPATH correctly (already defined in environment).
  30. EMACSLOADPATH=$(buildlisppath)
  31. # Subdirectories to be made if $(srcdir) is different from the current
  32. # directory.
  33. SUBDIRS=quail
  34. # Files generated from TIT dictionaries for Chinese GB character set.
  35. TIT_GB=\
  36. quail/CCDOSPY.elc \
  37. quail/Punct.elc \
  38. quail/QJ.elc \
  39. quail/SW.elc \
  40. quail/TONEPY.elc
  41. # Files generated from TIT dictionaries for Chinese BIG5 character set.
  42. TIT_BIG5=\
  43. quail/4Corner.elc \
  44. quail/ARRAY30.elc \
  45. quail/ECDICT.elc \
  46. quail/ETZY.elc \
  47. quail/Punct-b5.elc \
  48. quail/PY-b5.elc \
  49. quail/QJ-b5.elc \
  50. quail/ZOZY.elc
  51. CHINESE_TIT=$(TIT_GB) $(TIT_BIG5)
  52. NON_TIT_GB=$(srcdir)/quail/py-punct.elc
  53. NON_TIT_BIG5=$(srcdir)/quail/pypunct-b5.elc
  54. CHINESE_NON_TIT=$(NON_TIT_GB) $(NON_TIT_BIG5)
  55. CHINESE_GB=$(TIT_GB) $(NON_TIT_GB)
  56. CHINESE_BIG5=$(TIT_BIG5) $(NON_TIT_BIG5)
  57. JAPANESE=$(srcdir)/quail/japanese.elc $(srcdir)/ja-dic/ja-dic.elc
  58. KOREAN= $(srcdir)/quail/hangul.elc \
  59. $(srcdir)/quail/hanja.elc \
  60. $(srcdir)/quail/hanja3.elc \
  61. $(srcdir)/quail/hanja-jis.elc \
  62. $(srcdir)/quail/symbol-ksc.elc
  63. THAI=$(srcdir)/quail/thai.elc
  64. VIETNAMESE=$(srcdir)/quail/viqr.elc $(srcdir)/quail/vntelex.elc
  65. LAO=$(srcdir)/quail/lao.elc $(srcdir)/quail/lrt.elc
  66. INDIAN=$(srcdir)/quail/indian.elc
  67. TIBETAN=$(srcdir)/quail/tibetan.elc
  68. LATIN= $(srcdir)/quail/latin-pre.elc \
  69. $(srcdir)/quail/latin-post.elc \
  70. $(srcdir)/quail/latin-alt.elc \
  71. $(srcdir)/quail/latin-ltx.elc \
  72. $(srcdir)/quail/welsh.elc
  73. UNICODE=$(srcdir)/quail/sgml-input.elc \
  74. $(srcdir)/quail/rfc1345.elc \
  75. $(srcdir)/quail/uni-input.elc
  76. SLAVIC= \
  77. $(srcdir)/quail/czech.elc \
  78. $(srcdir)/quail/croatian.elc \
  79. $(srcdir)/quail/slovak.elc
  80. GREEK=$(srcdir)/quail/greek.elc
  81. RUSSIAN=$(srcdir)/quail/cyrillic.elc $(srcdir)/quail/cyril-jis.elc
  82. MISC= \
  83. $(srcdir)/quail/arabic.elc \
  84. $(srcdir)/quail/ethiopic.elc \
  85. $(srcdir)/quail/ipa.elc \
  86. $(srcdir)/quail/ipa-praat.elc \
  87. $(srcdir)/quail/hebrew.elc \
  88. $(srcdir)/quail/georgian.elc \
  89. $(srcdir)/quail/persian.elc \
  90. $(srcdir)/quail/sisheng.elc
  91. MISC_DIC=\
  92. quail/tsang-b5.elc \
  93. quail/quick-b5.elc \
  94. quail/tsang-cns.elc \
  95. quail/quick-cns.elc \
  96. quail/PY.elc \
  97. quail/ZIRANMA.elc \
  98. quail/CTLau.elc \
  99. quail/CTLau-b5.elc
  100. CHINESE=$(CHINESE_GB) $(CHINESE_BIG5)
  101. EASTASIA=$(CHINESE) $(JAPANESE) $(KOREAN)
  102. ASIA=$(EASTASIA) $(THAI) $(VIETNAMESE) $(LAO) $(INDIAN) $(TIBETAN)
  103. EUROPEAN=$(LATIN) $(SLAVIC) $(GREEK) $(RUSSIAN)
  104. WORLD=$(ASIA) $(EUROPEAN) $(MISC) $(MISC_DIC) $(UNICODE)
  105. TIT=$(CHINESE_TIT)
  106. NON_TIT=$(CHINESE_NON_TIT) $(JAPANESE) $(KOREAN) $(EUROPEAN) $(MISC)
  107. .SUFFIXES: .elc .el
  108. .el.elc:
  109. $(RUN_EMACS) -f batch-byte-compile $<
  110. all: $(BUILT_EMACS) $(SUBDIRS) $(WORLD) leim-list.el
  111. # To ensure that we can run Emacs. This target is ignored (never
  112. # being hit) if a user changes default value of EMACS.
  113. $(dot)$(dot)/src/emacs:
  114. cd ../src; $(MAKE) $(MFLAGS) emacs
  115. $(SUBDIRS):
  116. mkdir "$@"
  117. echo stamp>stamp-subdir
  118. # The rules which generate $(TIT) and ${MISC_DIC) files create them all
  119. # in one go. So we need to prevent parallel execution for that target,
  120. # otherwise Emacs complains about files being locked. .NOTPARALLEL is
  121. # for GNU Make, .NO_PARALLEL is for other Make's.
  122. .NOTPARALLEL: $(TIT) $(MISC_DIC)
  123. .NO_PARALLEL: $(TIT) $(MISC_DIC)
  124. # Rule to generate quail/*.el from CXTERM-DIC/*.tit.
  125. #
  126. # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
  127. # this can break with GNU Make 3.81 and later if sh.exe is used.
  128. $(TIT):
  129. $(RUN_EMACS) -l \
  130. $(ARGQUOTE)$(buildlisppath)/international/titdic-cnv$(ARGQUOTE) \
  131. --eval $(ARGQUOTE)(batch-titdic-convert t)$(ARGQUOTE) \
  132. -dir quail $(srcdir)/CXTERM-DIC
  133. $(RUN_EMACS) -l \
  134. $(ARGQUOTE)$(buildlisppath)/international/quail$(ARGQUOTE) \
  135. -f batch-byte-compile $(TIT:.elc=.el)
  136. # Rule to generate quail/*.el from MISC_DIC/*.tit.
  137. $(MISC_DIC):
  138. $(RUN_EMACS) -l \
  139. $(ARGQUOTE)$(buildlisppath)/international/titdic-cnv$(ARGQUOTE) \
  140. -f batch-miscdic-convert -dir quail $(srcdir)/MISC-DIC
  141. $(RUN_EMACS) -l \
  142. $(ARGQUOTE)$(buildlisppath)/international/quail$(ARGQUOTE) \
  143. -f batch-byte-compile $(MISC_DIC:.elc=.el)
  144. #
  145. # WARNING: Do NOT split the parts inside $(ARGQUOTE)s into multiple lines as
  146. # this can break with GNU Make 3.81 and later if sh.exe is used.
  147. leim-list.el: $(SUBDIRS) $(WORLD) $(srcdir)/leim-ext.el
  148. - $(DEL) leim-list.el
  149. $(RUN_EMACS) -l \
  150. $(ARGQUOTE)$(buildlisppath)/international/quail$(ARGQUOTE) \
  151. --eval $(ARGQUOTE)(update-leim-list-file $(DQUOTE).$(DQUOTE))$(ARGQUOTE)
  152. $(RUN_EMACS) --eval $(ARGQUOTE)(w32-append-code-lines $(DQUOTE)$@$(DQUOTE) $(DQUOTE)$(srcdir)/leim-ext.el$(DQUOTE))$(ARGQUOTE)
  153. install: all
  154. - mkdir "$(INSTALLDIR)"
  155. - $(DEL) $(DIRNAME)_same-dir.tst
  156. - $(DEL) $(INSTALL_DIR)/$(DIRNAME)_same-dir.tst
  157. echo SameDirTest > $(INSTALL_DIR)/$(DIRNAME)_same-dir.tst
  158. $(IFNOTSAMEDIR) $(CP) leim-list.el $(INSTALLDIR) $(ENDIF)
  159. $(IFNOTSAMEDIR) $(CP_DIR) quail $(INSTALLDIR) $(ENDIF)
  160. $(IFNOTSAMEDIR) $(CP_DIR) ja-dic $(INSTALLDIR) $(ENDIF)
  161. - $(DEL) $(INSTALL_DIR)/$(DIRNAME)_same-dir.tst
  162. clean mostlyclean:
  163. - $(FOREACH) $(TIT) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
  164. - $(FOREACH) $(MISC_DIC) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
  165. - $(FOREACH) $(TIT:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
  166. - $(FOREACH) $(MISC_DIC:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
  167. - $(DEL) leim-list.el
  168. - $(DEL) leim-list.el~
  169. distclean: clean
  170. - $(DEL) stamp-subdir
  171. - $(DEL) makefile
  172. maintainer-clean: distclean
  173. - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
  174. # We used to delete *~ here, but that might inadvertently remove
  175. # precious files if it happens to match their short 8+3 aliases.
  176. extraclean: maintainer-clean
  177. - $(FOREACH) *.el~ "#*" $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)