]> code.delx.au - gnu-emacs/blob - admin/unidata/Makefile.in
* admin/unidata/Makefile.in: Check for deleted uni- files.
[gnu-emacs] / admin / unidata / Makefile.in
1 ### @configure_input@
2
3 # Copyright (C) 2012-2014 Free Software Foundation, Inc.
4
5 # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
6 # National Institute of Advanced Industrial Science and Technology (AIST)
7 # Registration Number H13PRO009
8 #
9 # This file is part of GNU Emacs.
10
11 # GNU Emacs is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
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
22 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23
24 SHELL = @SHELL@
25
26 srcdir = @srcdir@
27 top_srcdir = @top_srcdir@
28 top_builddir = @top_builddir@
29
30 EMACS = ${top_builddir}/src/emacs
31 unidir = ${top_srcdir}/lisp/international
32 emacs = "${EMACS}" -batch --no-site-file --no-site-lisp
33
34 .PHONY: all unifiles
35
36 all: ${top_srcdir}/src/macuvs.h unifiles
37
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 \
44 --eval '(uvs-print-table-ivd "${srcdir}/IVD_Sequences.txt" "Adobe-Japan1")' \
45 > $@
46
47 %.elc: %.el
48 ${emacs} -f batch-byte-compile $<
49
50 unidata.txt: ${srcdir}/UnicodeData.txt
51 sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < $< > $@
52
53 FORCE =
54 FORCE:
55 .PHONY: FORCE
56
57 ${unidir}/charprop.el: ${FORCE} ${srcdir}/unidata-gen.el ${srcdir}/UnicodeData.txt | \
58 ${srcdir}/unidata-gen.elc unidata.txt
59 -if [ -f "$@" ]; then \
60 cd ${unidir} && chmod +w charprop.el `sed -n 's/^;; FILE: //p' < charprop.el`; \
61 fi
62 ${emacs} -L ${srcdir} -l unidata-gen -f unidata-gen-files \
63 ${srcdir} "${unidir}"
64
65 ## Check for deleted uni- files, and if any such, force a rebuild.
66 ## Perhaps a more elegant way would be for the previous rule
67 ## to generate a Makefile fragment explicitly listing the uni- files,
68 ## which this file could include. If no fragment, rebuild everything.
69 unifiles: ${unidir}/charprop.el
70 for f in `sed -n 's/^;; FILE: //p' < $<`; do \
71 [ -f ${unidir}/$$f ] || { ${MAKE} $< FORCE=FORCE || exit 1; break; };\
72 done
73
74 .PHONY: clean bootstrap-clean distclean maintainer-clean extraclean
75
76 clean:
77 rm -f ${srcdir}/*.elc unidata.txt
78
79 bootstrap-clean: clean
80
81 distclean: clean
82 rm -f Makefile
83
84 maintainer-clean: distclean
85
86 ## Do not remove these files, even in a bootstrap, because they rarely
87 ## change and it slows down bootstrap (a tiny bit).
88 ## Cf leim/ja-dic (which is much slower).
89 extraclean:
90 rm -f ${top_srcdir}/src/macuvs.h
91 if test -f ${unidir}/charprop.el; then \
92 (cd ${unidir} && rm -f `sed -n 's/^;; FILE: //p' < charprop.el`); \
93 rm -f ${unidir}/charprop.el; \
94 fi