emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/bnf-mode f99de60 47/74: Cleaned up Makefile


From: Stefan Monnier
Subject: [elpa] externals/bnf-mode f99de60 47/74: Cleaned up Makefile
Date: Thu, 9 May 2019 08:27:51 -0400 (EDT)

branch: externals/bnf-mode
commit f99de60613956d4fcd273a66262abf4a399154fe
Author: Serghei Iakovlev <address@hidden>
Commit: Serghei Iakovlev <address@hidden>

    Cleaned up Makefile
---
 .gitignore |  1 -
 Makefile   | 20 ++++++++++----------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/.gitignore b/.gitignore
index 87befbc..2212c96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,3 @@
 *.elc
 .cask/
 README
-README.org2
diff --git a/Makefile b/Makefile
index 6ff1a65..f6bfbee 100644
--- a/Makefile
+++ b/Makefile
@@ -22,15 +22,17 @@
 SHELL := $(shell which bash)
 ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
 
-EMACS := emacs
-CASK = cask
+EMACS ?= emacs
+CASK ?= cask
 PANDOC ?= pandoc
 
 EMACSFLAGS ?=
 TESTFLAGS ?= --reporter ert+duration
 PANDOCLAGS ?= --fail-if-warnings \
        --reference-links \
-       --atx-headers
+       --atx-headers \
+       -f org+empty_paragraphs \
+       -t plain
 
 PKGDIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
 
@@ -44,7 +46,7 @@ VERSION ?= $(shell $(CASK) version)
 .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
+Makefile: ;              # skip prerequisite discovery
 
 # Run make help by default
 .DEFAULT_GOAL = build
@@ -69,11 +71,9 @@ $(PKGDIR): Cask
        $(CASK) install
        touch $(PKGDIR)
 
-README: README.org2
-       $(PANDOC) $(PANDOCLAGS) -f org+empty_paragraphs -t plain -o $@ $^
-
-README.org2: README.org
-       $(shell cat $^ | sed -e "s/\[\[.*\.svg\]\]//g"  > $@)
+RE_BADGES = "s/\[\[.*\.svg\]\]//g"
+README: README.org
+       $(shell cat $^ | sed -e $(RE_BADGES) | $(PANDOC) $(PANDOCLAGS) -o $@)
 
 # Public targets
 
@@ -98,7 +98,7 @@ test:
 .PHONY: clean
 clean:
        $(CASK) clean-elc
-       $(RM) -f README README.org2
+       $(RM) -f README
 
 .PHONY: help
 help: .title



reply via email to

[Prev in Thread] Current Thread [Next in Thread]