Hi, Jeremy Sowden <aza...@debian.org> writes:
> 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. Thank you, yes, this is one of the right ways to solve this issue, and I hope it's evident to everyone following this thread why this is the case. :) Please use Xiyue Deng (manphiz)'s work on SUBSTVARS for "VERSION=X.Y.Z", and feel free to apply any fixups; I seem to remember that there's something like a fragile regex. > I will push this change and review the rest of this (lengthy :)) > report. Rather than reading this mentoring thread--long form for educational value--it's probably faster to review d/changelog, diff debian/20111005-2.1, and check for consistency. P.S. did you forget to push? Cheers, Nicholas
signature.asc
Description: PGP signature