[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bnf-mode bcad720 08/22: Optimize 'make help' target per
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bnf-mode bcad720 08/22: Optimize 'make help' target performance |
Date: |
Tue, 3 Mar 2020 10:56:53 -0500 (EST) |
branch: externals/bnf-mode
commit bcad720be8c1cc38c9842859d6f3f40cb1d13c58
Author: Serghei Iakovlev <address@hidden>
Commit: Serghei Iakovlev <address@hidden>
Optimize 'make help' target performance
---
Makefile | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index 81fc80a..a55c782 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
-SHELL := $(shell which bash)
+## Sane defaults
+SHELL ?= $(shell which sh)
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
EMACS ?= emacs
@@ -32,25 +33,24 @@ PANDOCLAGS ?= --fail-if-warnings \
--atx-headers \
-f org+empty_paragraphs
-PKGDIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
-
-## File lists
-
-SRCS = bnf-mode.el
-OBJS = $(SRCS:.el=.elc)
+PKGDIR = $(ROOT_DIR)
ARCHIVE_NAME = bnf-mode
-VERSION ?= $(shell $(CASK) version)
+VERSION = $(shell sh -c "grep -oh -E 'Version:.*' bnf-mode.el | cut -d' ' -f2")
PACKAGE_NAME = $(ARCHIVE_NAME)-$(VERSION)
+.DEFAULT_GOAL = build
+
.SILENT: ; # no need for @
.ONESHELL: ; # recipes execute in same shell
.NOTPARALLEL: ; # wait for this target to finish
.EXPORT_ALL_VARIABLES: ; # send all vars to shell
Makefile: ; # skip prerequisite discovery
-# Run make help by default
-.DEFAULT_GOAL = build
+## File lists
+
+SRCS = bnf-mode.el
+OBJS = $(SRCS:.el=.elc)
## Internal variables
@@ -67,10 +67,20 @@ else
RUNEMACS = $(CASK) exec $(EMACSBATCH)
endif
+.PHONY: pkg-dir
+pkg-dir:
+ifeq ($(PKGDIR),$(ROOT_DIR))
+ifndef HAVE_CASK
+ $(error "$(CASK) is not available. Please run make help")
+else
+ PKGDIR=$(shell EMACS=$(EMACS) $(CASK) package-directory)
+endif
+endif
+
%.elc: %.el $(PKGDIR)
$(RUNEMACS) --eval '(setq byte-compile-error-on-warn t)' -f
batch-byte-compile $<
-$(PKGDIR): Cask
+$(PKGDIR): pkg-dir Cask
$(CASK) install
touch $(PKGDIR)
- [elpa] externals/bnf-mode updated (3b2f66a -> 4a7aff6), Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 8487e3d 01/22: Specify matrix rows that are allowed to fail, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 55fd2bb 02/22: Merge pull request #9 from sergeyklay/sync-elpa, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode e0a3763 03/22: Update documentation, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 11b19fa 04/22: Merge pull request #10 from sergeyklay/feature/update-docs, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode fde7599 05/22: Correct info file that serves as a top level directory, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode d67b136 06/22: Rephrase project description, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode bcad720 08/22: Optimize 'make help' target performance,
Stefan Monnier <=
- [elpa] externals/bnf-mode 6ab82b0 10/22: Cleaned up no longer needed stuff from Makefile, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode b600de4 07/22: Added support of outline-minor-mode, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 7535299 13/22: Add initial ability to generate info page, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 61c4601 12/22: Correct copyright notice format, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 99d3931 16/22: Updated make package targed to provide info files, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 25d962f 18/22: Cleaned up .elpaignore, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 67fea1d 11/22: Amended documentation, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 026dfcd 09/22: Mode variables definition from Makefile to the common place, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 360bd7f 15/22: Update documentation, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode bdba298 20/22: Fixed misspelling, Stefan Monnier, 2020/03/03