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.
This commit is contained in:
Donald Curtis 2013-04-21 08:31:58 -05:00
parent eddd3de86e
commit a5859f2e7a

View file

@ -5,7 +5,15 @@ HTMLDIR := ./html
WORKDIR := ./working WORKDIR := ./working
EMACS := emacs 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 all: build json index
@ -57,6 +65,8 @@ $(RCPDIR)/.dirstamp: .FORCE
## Recipe rules ## Recipe rules
$(RCPDIR)/%: .FORCE $(RCPDIR)/%: .FORCE
@echo " • Building recipe $(@F) ..." @echo " • Building recipe $(@F) ..."
@echo "---$(TEST)"
-rm -vf $(PKGDIR)/$(@F)-* -rm -vf $(PKGDIR)/$(@F)-*
$(EVAL) "(package-build-archive '$(@F))" $(EVAL) "(package-build-archive '$(@F))"