makefile.w32-in 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # makefile.w32-in -- W32 -*- Makefile -*- to generate character property tables.
  2. # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
  3. # National Institute of Advanced Industrial Science and Technology (AIST)
  4. # Registration Number H13PRO009
  5. #
  6. # This file is part of GNU Emacs.
  7. # GNU Emacs is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation, either version 3 of the License, or
  10. # (at your option) any later version.
  11. # GNU Emacs is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. # You should have received a copy of the GNU General Public License
  16. # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  17. EMACS = ../../src/$(BLD)/emacs.exe
  18. DSTDIR = ../../lisp/international
  19. lisp = $(CURDIR)/../../lisp
  20. # EMACSLOADPATH should include international, so Emacs finds encoded-kb.
  21. # It should include emacs-lisp, so Emacs finds bytecomp. This is because
  22. # lisp/subdirs.el is not generated yet when the commands below run.
  23. EMACSLOADPATH = $(lisp);$(lisp)/international;$(lisp)/emacs-lisp
  24. # Quote EMACS so it could be a file name with embedded whitespace
  25. RUNEMACS = "$(EMACS)" -Q -batch
  26. all: $(DSTDIR)/charprop.el
  27. .el.elc:
  28. $(RUNEMACS) -f batch-byte-compile $<
  29. unidata.txt: UnicodeData.txt
  30. sed -e \
  31. $(ARGQUOTE)s/\([^;]*\);\(.*\)/(#x\1 $(DQUOTE)\2$(DQUOTE))/$(ARGQUOTE)\
  32. -e $(ARGQUOTE)s/;/$(DQUOTE) $(DQUOTE)/g$(ARGQUOTE) < UnicodeData.txt > $@
  33. charprop-SH: unidata-gen.elc unidata.txt
  34. ELC=$(CURDIR)/unidata-gen.elc; \
  35. DATADIR=$(CURDIR); \
  36. DATA=unidata.txt; \
  37. cd $(DSTDIR); \
  38. $(RUNEMACS) --load $${ELC} -f unidata-gen-files $${DATADIR} $${DATA}
  39. charprop-CMD: unidata-gen.elc unidata.txt
  40. $(RUNEMACS) --eval $(ARGQUOTE)(cd $(DQUOTE)$(DSTDIR)$(DQUOTE))$(ARGQUOTE) --load $(CURDIR)/unidata-gen.elc -f unidata-gen-files $(CURDIR) unidata.txt
  41. ${DSTDIR}/charprop.el: charprop-$(SHELLTYPE)
  42. clean:
  43. - $(DEL) unidata-gen.elc unidata.txt