Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-8
[bpt/emacs.git] / admin / unidata / Makefile
index 1d1c414..220477b 100644 (file)
 
 EMACS = ../../src/emacs
 DSTDIR = ../../lisp/international
-RUNEMACS = ${EMACS} -q --no-site-file --multibyte -batch
+RUNEMACS = ${EMACS} -Q --multibyte -batch
 
-all: charprop.el
+all: ${DSTDIR}/charprop.el
 
-unidata-gen.elc: unidata-gen.el
-       ${RUNEMACS} -f batch-byte-compile ./unidata-gen.el
+.el.elc:
+       ${RUNEMACS} -batch -f batch-byte-compile $<
 
-charprop.el: unidata-gen.elc UnicodeData.txt
-       ${RUNEMACS} -l ./unidata-gen.elc -f unidata-gen-files
+unidata.txt: UnicodeData.txt
+       sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < $< > $@
+
+${DSTDIR}/charprop.el: unidata-gen.elc unidata.txt
+       ELC=`/bin/pwd`/unidata-gen.elc; \
+       DATA=`/bin/pwd`/unidata.txt; \
+       cd ${DSTDIR}; \
+       ${RUNEMACS} -batch --load $${ELC} -f unidata-gen-files $${DATA}
 
 install: charprop.el
        cp charprop.el ${DSTDIR}
@@ -40,4 +46,6 @@ clean:
        if test -f charprop.el; then \
          rm -f `sed -n 's/^;; FILE: //p' < charprop.el`; \
        fi
-       rm -f charprop.el unidata-gen.elc
+       rm -f charprop.el unidata-gen.elc unidata.txt
+
+# arch-tag: 3f576384-a8e7-4ec5-9d2e-9190c71683b4