Merge from emacs-23; up to 2010-06-02T00:10:42Z!yamaoka@jpl.org.
[bpt/emacs.git] / admin / unidata / makefile.w32-in
CommitLineData
c7e85fc7 1# makefile.w32-in -- W32 -*- Makefile -*- to generate character property tables.
5df4f04c 2# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
c7e85fc7
EZ
3# National Institute of Advanced Industrial Science and Technology (AIST)
4# Registration Number H13PRO009
5#
6# This file is part of GNU Emacs.
7
9ad5de0c 8# GNU Emacs is free software: you can redistribute it and/or modify
c7e85fc7 9# it under the terms of the GNU General Public License as published by
9ad5de0c
GM
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
c7e85fc7
EZ
12
13# GNU Emacs is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17
18# You should have received a copy of the GNU General Public License
9ad5de0c
GM
19# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
20
c7e85fc7
EZ
21
22EMACS = ../../src/$(BLD)/emacs.exe
23DSTDIR = ../../lisp/international
f96b6330
EZ
24lisp = $(CURDIR)/../../lisp
25# EMACSLOADPATH should include international, so Emacs finds encoded-kb.
26# It should include emacs-lisp, so Emacs finds bytecomp. This is because
27# lisp/subdirs.el is not generated yet when the commands below run.
28EMACSLOADPATH = $(lisp);$(lisp)/international;$(lisp)/emacs-lisp
c7e85fc7 29# Quote EMACS so it could be a file name with embedded whitespace
198a7a97 30RUNEMACS = "$(EMACS)" -Q -batch
c7e85fc7 31
cbc4fd20 32all: $(DSTDIR)/charprop.el ../../src/biditype.h ../../src/bidimirror.h
c7e85fc7
EZ
33
34.el.elc:
35 $(RUNEMACS) -f batch-byte-compile $<
36
37unidata.txt: UnicodeData.txt
b315b596
JR
38 sed -e \
39 $(ARGQUOTE)s/\([^;]*\);\(.*\)/(#x\1 $(DQUOTE)\2$(DQUOTE))/$(ARGQUOTE)\
8a7619ba 40 -e $(ARGQUOTE)s/;/$(DQUOTE) $(DQUOTE)/g$(ARGQUOTE) < UnicodeData.txt > $@
c7e85fc7
EZ
41
42charprop-SH: unidata-gen.elc unidata.txt
43 ELC=$(CURDIR)/unidata-gen.elc; \
44 DATA=$(CURDIR)/unidata.txt; \
45 cd $(DSTDIR); \
46 $(RUNEMACS) --load $${ELC} -f unidata-gen-files $${DATA}
47
48charprop-CMD: unidata-gen.elc unidata.txt
58617d04 49 $(RUNEMACS) --eval $(ARGQUOTE)(cd $(DQUOTE)$(DSTDIR)$(DQUOTE))$(ARGQUOTE) --load $(CURDIR)/unidata-gen.elc -f unidata-gen-files $(CURDIR)/unidata.txt
c7e85fc7
EZ
50
51${DSTDIR}/charprop.el: charprop-$(SHELLTYPE)
52
317fbf33
EZ
53../../src/biditype.h: UnicodeData.txt
54 gawk -F";" -f biditype.awk -v BINMODE=2 $< > biditype.h
cbc4fd20 55 $(CP) biditype.h $@
317fbf33
EZ
56 $(DEL) biditype.h
57
cbc4fd20
EZ
58../../src/bidimirror.h: BidiMirroring.txt
59 gawk -F"[; ]+" -f bidimirror.awk -v BINMODE=2 $< > bidimirror.h
60 $(CP) bidimirror.h $@
61 $(DEL) bidimirror.h
62
c7e85fc7 63clean:
cbc4fd20 64 - $(DEL) unidata-gen.elc unidata.txt biditype.h bidimirror.h
c7e85fc7 65