Merge from emacs-24; up to 2014-06-11T19:33:14Z!rgm@gnu.org
[bpt/emacs.git] / admin / unidata / Makefile.in
CommitLineData
bbece175 1### @configure_input@
a9f72fc1 2
ba318903 3# Copyright (C) 2012-2014 Free Software Foundation, Inc.
a9f72fc1 4
5df4f04c 5# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
f600cf3a
KH
6# National Institute of Advanced Industrial Science and Technology (AIST)
7# Registration Number H13PRO009
8#
9# This file is part of GNU Emacs.
10
9ad5de0c 11# GNU Emacs is free software: you can redistribute it and/or modify
f600cf3a 12# it under the terms of the GNU General Public License as published by
9ad5de0c
GM
13# the Free Software Foundation, either version 3 of the License, or
14# (at your option) any later version.
f600cf3a
KH
15
16# GNU Emacs is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20
21# You should have received a copy of the GNU General Public License
9ad5de0c
GM
22# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23
50b13cde 24SHELL = @SHELL@
a9f72fc1
GM
25
26srcdir = @srcdir@
a9f72fc1 27top_srcdir = @top_srcdir@
9835cedb 28top_builddir = @top_builddir@
f600cf3a 29
9835cedb 30EMACS = ${top_builddir}/src/emacs
a9f72fc1 31DSTDIR = ${top_srcdir}/lisp/international
b8e3b0a9 32emacs = "${EMACS}" -batch --no-site-file --no-site-lisp
f600cf3a 33
7e3bf78c
GM
34.PHONY: all compile install
35
cf2f54c4
PE
36all: ${top_srcdir}/src/macuvs.h ${DSTDIR}/charprop.el
37
4c920f37
GM
38## Specify .elc as an order-only prereq so as to not needlessly rebuild
39## target just because the .elc is missing.
40## Same with charprop.el below.
41${top_srcdir}/src/macuvs.h: ${srcdir}/uvs.el ${srcdir}/IVD_Sequences.txt | \
42 ${srcdir}/uvs.elc
43 ${emacs} -L ${srcdir} -l uvs \
cf2f54c4
PE
44 --eval '(uvs-print-table-ivd "${srcdir}/IVD_Sequences.txt" "Adobe-Japan1")' \
45 > $@
f600cf3a 46
4c920f37 47%.elc: %.el
a9f72fc1 48 ${emacs} -f batch-byte-compile $<
f600cf3a 49
a9f72fc1 50unidata.txt: ${srcdir}/UnicodeData.txt
4c920f37 51 sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < $< > $@
4c452d71 52
4c920f37
GM
53${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.el ${srcdir}/UnicodeData.txt | \
54 ${srcdir}/unidata-gen.elc unidata.txt
c2685641
GM
55 -if [ -f "$@" ]; then \
56 cd ${DSTDIR} && chmod +w charprop.el `sed -n 's/^;; FILE: //p' < charprop.el`; \
57 fi
9835cedb
GM
58 ${emacs} -L ${srcdir} -l unidata-gen -f unidata-gen-files \
59 ${srcdir} "${DSTDIR}"
a9f72fc1
GM
60
61## Like the above, but generate in PWD rather than lisp/international.
62charprop.el: ${srcdir}/unidata-gen.elc unidata.txt
9835cedb
GM
63 ${emacs} -L ${srcdir} -l unidata-gen -f unidata-gen-files \
64 ${srcdir}
f600cf3a 65
7e3bf78c
GM
66.PHONY: clean bootstrap-clean distclean maintainer-clean extraclean
67
f600cf3a
KH
68install: charprop.el
69 cp charprop.el ${DSTDIR}
70 cp `sed -n 's/^;; FILE: //p' < charprop.el` ${DSTDIR}
71
72clean:
73 if test -f charprop.el; then \
74 rm -f `sed -n 's/^;; FILE: //p' < charprop.el`; \
75 fi
447892ed 76 rm -f charprop.el ${srcdir}/*.elc unidata.txt
a9f72fc1 77
c20cfd63
GM
78bootstrap-clean: clean
79
a9f72fc1 80distclean: clean
7e3bf78c 81 rm -f Makefile
a9f72fc1 82
c20cfd63 83maintainer-clean: distclean
7e3bf78c
GM
84
85## Do not remove these files, even in a bootstrap, because they rarely
86## change and it slows down bootstrap (a tiny bit).
87## Cf leim/ja-dic (which is much slower).
88extraclean:
cf2f54c4 89 rm -f ${top_srcdir}/src/macuvs.h
7e3bf78c
GM
90 if test -f ${DSTDIR}/charprop.el; then \
91 (cd ${DSTDIR} && rm -f `sed -n 's/^;; FILE: //p' < charprop.el`); \
92 rm -f ${DSTDIR}/charprop.el; \
93 fi