chiark / gitweb /
Makefile: Only take the last line from Emacs when discovering the version.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 10 May 2018 15:28:22 +0000 (16:28 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 10 May 2018 15:28:22 +0000 (16:28 +0100)
It turns out that some Emacsen spew huge screeds of crud while they're
starting up, even if you ask them not to run all of the site
congiguration cruft.

Makefile

index af5dc13dbd3c8b0929df8a763350184376d353ef..4df8c56e5d7561aaaeafc0978df862db06395004 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -69,7 +69,8 @@ ifneq ($(EMACS),nil)
 EMACSLIB                = $(HOME)/lib/emacs
 
 EMACS_VERSION          := $(shell $(EMACS) 2>&1 -Q --batch --eval \
-       '(message "%s %s" emacs-major-version emacs-minor-version)')
+       '(message "%s %s" emacs-major-version emacs-minor-version)' | \
+       tail -n1)
 emacs-version-p                 = $(shell set -- $(EMACS_VERSION); \
        if [ $$1 -gt $1 ] || ([ $$1 -eq $1 ] && [ $$2 -ge $2 ]); then \
          echo t; \