From a5859f2e7a0f332e5403615fd0138aa45b2b10a2 Mon Sep 17 00:00:00 2001 From: Donald Curtis Date: Sun, 21 Apr 2013 08:31:58 -0500 Subject: [PATCH] add rules to evaluate packages if older emacs cl-lib from ELPA is needed with versions of emacs < 24.3. this modification to the Makefile will test if a call to `package-initialize` may be needed. --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dd2b01f0..46d6fc8d 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,15 @@ HTMLDIR := ./html WORKDIR := ./working EMACS := emacs -EVAL := $(EMACS) --no-site-file --batch -l package-build.el --eval +EVAL := $(EMACS) + +## Check for needing to initialize CL-LIB from ELPA +NEED_CL-LIB := $(shell $(EMACS) --no-site-file --batch --eval '(prin1 (version< emacs-version "24.3"))') +ifeq ($(NEED_CL-LIB), t) + EVAL := $(EVAL) --eval "(package-initialize)" +endif + +EVAL := $(EVAL) --no-site-file --batch -l package-build.el --eval all: build json index @@ -57,6 +65,8 @@ $(RCPDIR)/.dirstamp: .FORCE ## Recipe rules $(RCPDIR)/%: .FORCE @echo " • Building recipe $(@F) ..." + + @echo "---$(TEST)" -rm -vf $(PKGDIR)/$(@F)-* $(EVAL) "(package-build-archive '$(@F))"