Commit | Line | Data |
---|---|---|
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 | 24 | SHELL = @SHELL@ |
a9f72fc1 GM |
25 | |
26 | srcdir = @srcdir@ | |
a9f72fc1 | 27 | top_srcdir = @top_srcdir@ |
9835cedb | 28 | top_builddir = @top_builddir@ |
f600cf3a | 29 | |
9835cedb | 30 | EMACS = ${top_builddir}/src/emacs |
a9f72fc1 | 31 | DSTDIR = ${top_srcdir}/lisp/international |
b8e3b0a9 | 32 | emacs = "${EMACS}" -batch --no-site-file --no-site-lisp |
f600cf3a | 33 | |
7e3bf78c GM |
34 | .PHONY: all compile install |
35 | ||
474a8465 | 36 | all: ${DSTDIR}/charprop.el |
f600cf3a | 37 | |
f23df5a0 | 38 | .el.elc: |
a9f72fc1 | 39 | ${emacs} -f batch-byte-compile $< |
f600cf3a | 40 | |
a9f72fc1 GM |
41 | unidata.txt: ${srcdir}/UnicodeData.txt |
42 | sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < ${srcdir}/UnicodeData.txt > $@ | |
4c452d71 | 43 | |
7e3bf78c GM |
44 | compile: ${srcdir}/unidata-gen.elc |
45 | ||
336b7334 | 46 | ## Depend on .el rather than .elc so as not to needlessly rebuild |
7e3bf78c GM |
47 | ## uni-*.el files just because .elc is missing. |
48 | ## Same for UnicodeData.txt v unidata.txt. | |
49 | ${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.el ${srcdir}/UnicodeData.txt | |
50 | ${MAKE} ${MFLAGS} compile unidata.txt EMACS="${EMACS}" | |
c2685641 GM |
51 | -if [ -f "$@" ]; then \ |
52 | cd ${DSTDIR} && chmod +w charprop.el `sed -n 's/^;; FILE: //p' < charprop.el`; \ | |
53 | fi | |
9835cedb GM |
54 | ${emacs} -L ${srcdir} -l unidata-gen -f unidata-gen-files \ |
55 | ${srcdir} "${DSTDIR}" | |
a9f72fc1 GM |
56 | |
57 | ## Like the above, but generate in PWD rather than lisp/international. | |
58 | charprop.el: ${srcdir}/unidata-gen.elc unidata.txt | |
9835cedb GM |
59 | ${emacs} -L ${srcdir} -l unidata-gen -f unidata-gen-files \ |
60 | ${srcdir} | |
f600cf3a | 61 | |
7e3bf78c GM |
62 | .PHONY: clean bootstrap-clean distclean maintainer-clean extraclean |
63 | ||
f600cf3a KH |
64 | install: charprop.el |
65 | cp charprop.el ${DSTDIR} | |
66 | cp `sed -n 's/^;; FILE: //p' < charprop.el` ${DSTDIR} | |
67 | ||
68 | clean: | |
69 | if test -f charprop.el; then \ | |
70 | rm -f `sed -n 's/^;; FILE: //p' < charprop.el`; \ | |
71 | fi | |
447892ed | 72 | rm -f charprop.el ${srcdir}/*.elc unidata.txt |
a9f72fc1 | 73 | |
c20cfd63 GM |
74 | bootstrap-clean: clean |
75 | ||
a9f72fc1 | 76 | distclean: clean |
7e3bf78c | 77 | rm -f Makefile |
a9f72fc1 | 78 | |
c20cfd63 | 79 | maintainer-clean: distclean |
7e3bf78c GM |
80 | |
81 | ## Do not remove these files, even in a bootstrap, because they rarely | |
82 | ## change and it slows down bootstrap (a tiny bit). | |
83 | ## Cf leim/ja-dic (which is much slower). | |
84 | extraclean: | |
85 | if test -f ${DSTDIR}/charprop.el; then \ | |
86 | (cd ${DSTDIR} && rm -f `sed -n 's/^;; FILE: //p' < charprop.el`); \ | |
87 | rm -f ${DSTDIR}/charprop.el; \ | |
88 | fi |