branch: externals/bnf-mode
commit ebd9b83865394103f8db5bd5431f47c863239ed6
Author: Serghei Iakovlev <[email protected]>
Commit: Serghei Iakovlev <[email protected]>
Added ability to generate info
---
.gitignore | 1 +
Makefile | 14 ++++++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 2212c96..8a951a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,4 +8,5 @@
*~
*.elc
.cask/
+bnf-mode.info
README
diff --git a/Makefile b/Makefile
index b01c7e0..02078b4 100644
--- a/Makefile
+++ b/Makefile
@@ -31,8 +31,7 @@ TESTFLAGS ?= --reporter ert+duration
PANDOCLAGS ?= --fail-if-warnings \
--reference-links \
--atx-headers \
- -f org+empty_paragraphs \
- -t plain
+ -f org+empty_paragraphs
PKGDIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
@@ -40,6 +39,7 @@ PKGDIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
SRCS = bnf-mode.el
OBJS = $(SRCS:.el=.elc)
+ARCHIVE_NAME=bnf-mode
VERSION ?= $(shell $(CASK) version)
.SILENT: ; # no need for @
@@ -71,9 +71,15 @@ $(PKGDIR): Cask
$(CASK) install
touch $(PKGDIR)
-RE_BADGES = "s/\[\[.*\.svg\]\]//g"
+define org-clean
+ cat $^ | sed -e "s/\[\[.*\.svg\]\]//g"
+endef
+
+$(ARCHIVE_NAME).info: README.org
+ $(call org-clean,$^) | $(PANDOC) $(PANDOCLAGS) -t texinfo | makeinfo -o
$@
+
README: README.org
- $(shell cat $^ | sed -e $(RE_BADGES) | $(PANDOC) $(PANDOCLAGS) -o $@)
+ $(call org-clean,$^) | $(PANDOC) $(PANDOCLAGS) -t plain -o $@
# Public targets