From b2f6f1104d51d0d80567c2f0066983cef96c84c1 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Thu, 10 May 2018 16:28:22 +0100 Subject: [PATCH] Makefile: Only take the last line from Emacs when discovering the version. Organization: Straylight/Edgeware From: Mark Wooding 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; \ -- [mdw]