chiark / gitweb /
Makefile: Only set up `bracketed-paste' on Emacs 24.3 or later.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 14 Aug 2017 17:14:54 +0000 (18:14 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 14 Aug 2017 17:15:57 +0000 (18:15 +0100)
It depends on `cl-macs', which only became its own proper library in
24.2.90.  The tricky part was the new machinery to discover the Emacs
version in detail.

Makefile

index 7668ee2d3755310ea1fbce78ec1451a631a689f5..342f3eff988c0232280bf143f1107f392336a1cc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -68,11 +68,21 @@ 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)')
+emacs-version-p                 = $(shell set -- $(EMACS_VERSION); \
+       if [ $$1 -gt $1 ] || ([ $$1 -eq $1 ] && [ $$2 -ge $2 ]); then \
+         echo t; \
+       fi)
+
 ELISP                  += make-regexp ew-hols
 ELISP                  += mdw-gnus-patch
 ELISP                  += mdw-multiple-cursors
 ELISP                  += git git-blame vc-git stgit quilt
+
+ifeq ($(call emacs-version-p,24,3),t)
 ELISP                  += bracketed-paste
+endif
 
 ELISP                  += dot-emacs
 dot-emacs_DEPS          = make-regexp