EMACS = ../../src/$(BLD)/emacs.exe
DSTDIR = ../../lisp/international
-EMACSLOADPATH = $(CURDIR)/../../lisp
+lisp = $(CURDIR)/../../lisp
+# EMACSLOADPATH should include international, so Emacs finds encoded-kb.
+# It should include emacs-lisp, so Emacs finds bytecomp. This is because
+# lisp/subdirs.el is not generated yet when the commands below run.
+EMACSLOADPATH = $(lisp);$(lisp)/international;$(lisp)/emacs-lisp
# Quote EMACS so it could be a file name with embedded whitespace
RUNEMACS = "$(EMACS)" -Q --multibyte -batch
$(RUNEMACS) -f batch-byte-compile $<
unidata.txt: UnicodeData.txt
- sed -e "s/\([^;]*\);\(.*\)/(#x\1 \"\2\")/" -e "s/;/\" \"/g" < $< > $@
+ sed -e \
+ $(ARGQUOTE)s/\([^;]*\);\(.*\)/(#x\1 $(DQUOTE)\2$(DQUOTE))/$(ARGQUOTE)\
+ -e $(ARGQUOTE)s/;/$(DQUOTE) $(DQUOTE)/g$(ARGQUOTE) < UnicodeData.txt > $@
charprop-SH: unidata-gen.elc unidata.txt
ELC=$(CURDIR)/unidata-gen.elc; \
$(RUNEMACS) --load $${ELC} -f unidata-gen-files $${DATA}
charprop-CMD: unidata-gen.elc unidata.txt
- cd $(DSTDIR)
- $(RUNEMACS) --load $(CURDIR)/unidata-gen.elc -f unidata-gen-files $(CURDIR/unidata.txt
- cd ../../admin/unidata
+ $(RUNEMACS) --eval $(ARGQUOTE)(cd $(DQUOTE)$(DSTDIR)$(DQUOTE))$(ARGQUOTE) --load $(CURDIR)/unidata-gen.elc -f unidata-gen-files $(CURDIR)/unidata.txt
${DSTDIR}/charprop.el: charprop-$(SHELLTYPE)