From: Mark Wooding Date: Thu, 10 May 2018 15:28:22 +0000 (+0100) Subject: Makefile: Only take the last line from Emacs when discovering the version. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/b2f6f1104d51d0d80567c2f0066983cef96c84c1 Makefile: Only take the last line from Emacs when discovering the version. 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. --- diff --git a/Makefile b/Makefile index af5dc13..4df8c56 100644 --- 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; \