Add C interface for Unicode character property table.
[bpt/emacs.git] / admin / unidata / Makefile.in
1 # Makefile -- 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
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
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
19 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
20
21
22 EMACS = ../../src/emacs
23 DSTDIR = ../../lisp/international
24 RUNEMACS = ${EMACS} -Q -batch
25
26 all: ${DSTDIR}/charprop.el ../../src/biditype.h ../../src/bidimirror.h
27
28 .el.elc:
29 ${RUNEMACS} -batch -f batch-byte-compile $<
30
31 unidata.txt: UnicodeData.txt
32 sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < UnicodeData.txt > $@
33
34 ${DSTDIR}/charprop.el: unidata-gen.elc unidata.txt
35 ELC=`/bin/pwd`/unidata-gen.elc; \
36 DATADIR=`/bin/pwd`; \
37 DATA=unidata.txt; \
38 cd ${DSTDIR}; \
39 ${RUNEMACS} -batch --load $${ELC} -f unidata-gen-files $${DATADIR} $${DATA}
40
41 ../../src/biditype.h: UnicodeData.txt
42 gawk -F";" -f biditype.awk $< > $@
43
44 ../../src/bidimirror.h: BidiMirroring.txt
45 gawk -F"[; ]+" -f bidimirror.awk $< > $@
46
47 install: charprop.el
48 cp charprop.el ${DSTDIR}
49 cp `sed -n 's/^;; FILE: //p' < charprop.el` ${DSTDIR}
50
51 clean:
52 if test -f charprop.el; then \
53 rm -f `sed -n 's/^;; FILE: //p' < charprop.el`; \
54 fi
55 rm -f charprop.el unidata-gen.elc unidata.txt