disable byte-compilation
[bpt/emacs.git] / admin / unidata / Makefile.in
index e1fe247..ceb89cc 100644 (file)
@@ -1,4 +1,7 @@
-# Makefile -- Makefile to generate character property tables.
+### @configure_input@
+
+# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+
 # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
 #   National Institute of Advanced Industrial Science and Technology (AIST)
 #   Registration Number H13PRO009
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
 
-EMACS = ../../src/emacs
-DSTDIR = ../../lisp/international
-RUNEMACS = ${EMACS} -Q -batch
+EMACS = ${top_builddir}/src/temacs
+DSTDIR = ${top_srcdir}/lisp/international
+emacs = "${EMACS}" -batch --no-site-file --no-site-lisp
 
-all: ${DSTDIR}/charprop.el ../../src/biditype.h ../../src/bidimirror.h
+.PHONY: all compile install
 
-.el.elc:
-       ${RUNEMACS} -batch -f batch-byte-compile $<
+all: ${top_srcdir}/src/macuvs.h ${DSTDIR}/charprop.el
 
-unidata.txt: UnicodeData.txt
-       sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < UnicodeData.txt > $@
+${top_srcdir}/src/macuvs.h: ${srcdir}/uvs.el ${srcdir}/IVD_Sequences.txt
+       ${emacs} -L ${srcdir} -l uvs \
+         --eval '(uvs-print-table-ivd "${srcdir}/IVD_Sequences.txt" "Adobe-Japan1")' \
+         > $@
 
-${DSTDIR}/charprop.el: unidata-gen.elc unidata.txt
-       ELC=`/bin/pwd`/unidata-gen.elc; \
-       DATADIR=`/bin/pwd`; \
-       DATA=unidata.txt; \
-       cd ${DSTDIR}; \
-       ${RUNEMACS} -batch --load $${ELC} -f unidata-gen-files $${DATADIR} $${DATA}
+unidata.txt: ${srcdir}/UnicodeData.txt
+       sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < $< > $@
+
+${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.el ${srcdir}/UnicodeData.txt | \
+  unidata.txt
+       -if [ -f "$@" ]; then \
+         cd ${DSTDIR} && chmod +w charprop.el `sed -n 's/^;; FILE: //p' < charprop.el`; \
+       fi
+       ${emacs} -L ${srcdir} -l unidata-gen -f unidata-gen-files \
+         ${srcdir} "${DSTDIR}"
 
-../../src/biditype.h: UnicodeData.txt
-       gawk -F";" -f biditype.awk $< > $@
+## Like the above, but generate in PWD rather than lisp/international.
+charprop.el: ${srcdir}/unidata-gen.el unidata.txt
+       ${emacs} -L ${srcdir} -l unidata-gen -f unidata-gen-files \
+         ${srcdir}
 
-../../src/bidimirror.h: BidiMirroring.txt
-       gawk -F"[; ]+" -f bidimirror.awk $< > $@
+.PHONY: clean bootstrap-clean distclean maintainer-clean extraclean
 
 install: charprop.el
        cp charprop.el ${DSTDIR}
@@ -52,4 +66,21 @@ clean:
        if test -f charprop.el; then \
          rm -f `sed -n 's/^;; FILE: //p' < charprop.el`; \
        fi
-       rm -f charprop.el unidata-gen.elc unidata.txt
+       rm -f charprop.el ${srcdir}/*.elc unidata.txt
+
+bootstrap-clean: clean
+
+distclean: clean
+       rm -f Makefile
+
+maintainer-clean: distclean
+
+## Do not remove these files, even in a bootstrap, because they rarely
+## change and it slows down bootstrap (a tiny bit).
+## Cf leim/ja-dic (which is much slower).
+extraclean:
+       rm -f ${top_srcdir}/src/macuvs.h
+       if test -f ${DSTDIR}/charprop.el; then \
+         (cd ${DSTDIR} && rm -f `sed -n 's/^;; FILE: //p' < charprop.el`); \
+         rm -f ${DSTDIR}/charprop.el; \
+       fi