This error: > debian/rules clean > dh clean --with elpa > dh_auto_clean > make -j8 clean > make[1]: Entering directory '/<<PKGBUILDDIR>>' > End of file during parsing > rm -f *.elc .latest-* autoloads.el scala-mode- Error: end-of-file nil mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode 0x943b01ebae87e2>)) debug-early-backtrace() debug-early(error (end-of-file)) read(#<buffer scala-mode-pkg.el>) (nth 2 (read (find-file "./scala-mode-pkg.el"))) (format "%s\n" (nth 2 (read (find-file "./scala-mode-pkg.el")))) (princ (format "%s\n" (nth 2 (read (find-file "./scala-mode-pkg.el"))))) command-line-1(("-L" "." "--eval" "(princ (format \"%s\\n\" (nth 2 (read (find-file \"./scala-mode-pkg.el\")))))")) command-line() normal-top-level().tar > /bin/sh: 1: Syntax error: "(" unexpected > make[1]: *** [Makefile:55: clean] Error 2 occurs because the Makefile does this (trimmed): VERSION := $(shell ${ELISP_COMMAND} $(ELISP_OPTIONS) --eval '(princ (format "%s\n" (nth 2 (read (find-file "$(PKG_FILE)")))))') MODE_NAME_VERSION = $(MODE_NAME)-$(VERSION) clean: $(RM) *.elc .latest-* autoloads.el $(MODE_NAME_VERSION).tar It tries to use Emacs to get the version from the scala-mode-pkg.el file, but that doesn't exist, so the output from the `$(shell)` command is a stack-trace, not a version number. Make prefers variable definitions given as arguments at the command line to those defined in the Makefile, so if `VERSION=X.Y.Z` is passed to `make clean`: override_dh_autoclean: dh_auto_clean -- VERSION=X.Y.Z Emacs isn't called, and the error goes away. I will push this change and review the rest of this (lengthy :)) report. J.
Attachment:
signature.asc
Description: PGP signature