summaryrefslogtreecommitdiff
path: root/admin/unidata
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-10-07 16:17:09 -0400
committerGlenn Morris <rgm@gnu.org>2014-10-07 16:17:09 -0400
commit23755ba32b9baeff4173e317624ceb89fc274468 (patch)
tree03fa4e60c045f274e94225df4752f5a56b3e9c03 /admin/unidata
parent8ca8fde8a2f94e9446efc5aa68020c0badeecb4d (diff)
downloademacs-23755ba32b9baeff4173e317624ceb89fc274468.tar.gz
* admin/unidata/Makefile.in: Check for deleted uni- files.
(all): Use unifiles rather than charprop.el. (FORCE): New variable and phony rule. (${unidir}/charprop.el): Respect FORCE. (unifiles): New rule. * src/Makefile.in ($(srcdir)/macuvs.h) ($(lispsource)/international/charprop.el): Add explicit FORCE. Fixes: debbugs:18489
Diffstat (limited to 'admin/unidata')
-rw-r--r--admin/unidata/Makefile.in19
1 files changed, 16 insertions, 3 deletions
diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in
index f1b8ba2bd13..4649b3b339d 100644
--- a/admin/unidata/Makefile.in
+++ b/admin/unidata/Makefile.in
@@ -31,9 +31,9 @@ EMACS = ${top_builddir}/src/emacs
unidir = ${top_srcdir}/lisp/international
emacs = "${EMACS}" -batch --no-site-file --no-site-lisp
-.PHONY: all
+.PHONY: all unifiles
-all: ${top_srcdir}/src/macuvs.h ${unidir}/charprop.el
+all: ${top_srcdir}/src/macuvs.h unifiles
## Specify .elc as an order-only prereq so as to not needlessly rebuild
## target just because the .elc is missing.
@@ -50,7 +50,11 @@ ${top_srcdir}/src/macuvs.h: ${srcdir}/uvs.el ${srcdir}/IVD_Sequences.txt | \
unidata.txt: ${srcdir}/UnicodeData.txt
sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < $< > $@
-${unidir}/charprop.el: ${srcdir}/unidata-gen.el ${srcdir}/UnicodeData.txt | \
+FORCE =
+FORCE:
+.PHONY: FORCE
+
+${unidir}/charprop.el: ${FORCE} ${srcdir}/unidata-gen.el ${srcdir}/UnicodeData.txt | \
${srcdir}/unidata-gen.elc unidata.txt
-if [ -f "$@" ]; then \
cd ${unidir} && chmod +w charprop.el `sed -n 's/^;; FILE: //p' < charprop.el`; \
@@ -58,6 +62,15 @@ ${unidir}/charprop.el: ${srcdir}/unidata-gen.el ${srcdir}/UnicodeData.txt | \
${emacs} -L ${srcdir} -l unidata-gen -f unidata-gen-files \
${srcdir} "${unidir}"
+## Check for deleted uni- files, and if any such, force a rebuild.
+## Perhaps a more elegant way would be for the previous rule
+## to generate a Makefile fragment explicitly listing the uni- files,
+## which this file could include. If no fragment, rebuild everything.
+unifiles: ${unidir}/charprop.el
+ for f in `sed -n 's/^;; FILE: //p' < $<`; do \
+ [ -f ${unidir}/$$f ] || { ${MAKE} $< FORCE=FORCE || exit 1; break; };\
+ done
+
.PHONY: clean bootstrap-clean distclean maintainer-clean extraclean
clean: