[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bnf-mode 7535299 13/22: Add initial ability to generate
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bnf-mode 7535299 13/22: Add initial ability to generate info page |
Date: |
Tue, 3 Mar 2020 10:56:54 -0500 (EST) |
branch: externals/bnf-mode
commit 7535299ff0ff2334b863b00d76fd197bc355dcab
Author: Serghei Iakovlev <address@hidden>
Commit: Serghei Iakovlev <address@hidden>
Add initial ability to generate info page
---
Makefile | 53 +++++++++++++++++++++++++++------------------
default.mk | 9 ++++++--
default.mk => docs/Makefile | 44 ++++++++++++++-----------------------
docs/bnf-mode.texi | 0
4 files changed, 55 insertions(+), 51 deletions(-)
diff --git a/Makefile b/Makefile
index 5c248fb..7dc4b03 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 Serghei Iakovlev
+# Copyright (C) 2019, 2020 Free Software Foundation, Inc.
#
# License
#
@@ -28,8 +28,9 @@ define org-clean
@cat $^ | sed -e "s/\[\[.*\.svg\]\]//g"
endef
-$(ARCHIVE_NAME).info: README.org
- $(call org-clean,$^) | $(PANDOC) $(PANDOCLAGS) -t texinfo | makeinfo -o
$@
+# TODO: Move to docs
+$(PACKAGE).info: README.org
+ $(call org-clean,$^) | $(PANDOC) $(PANDOCLAGS) -t texinfo | $(MAKEINFO)
-o $@
README: README.org
$(call org-clean,$^) | $(PANDOC) $(PANDOCLAGS) -t plain | sed -e
"s/\[\]//g" > $@
@@ -37,11 +38,11 @@ README: README.org
ChangeLog: NEWS
@cp $^ $@
-$(ARCHIVE_NAME)-pkg.el: $(ARCHIVE_NAME).el
+$(PACKAGE)-pkg.el: $(PACKAGE).el
@$(CASK) pkg-file
-$(PACKAGE_NAME).tar: README ChangeLog LICENSE $(ARCHIVE_NAME).el
$(ARCHIVE_NAME)-pkg.el $(ARCHIVE_NAME).info dir
- @$(TAR) -c -v -f $(PACKAGE_NAME).tar --transform
"s@^@$(PACKAGE_NAME)/@" $^
+$(ARCHIVE_NAME).tar: README ChangeLog LICENSE $(PACKAGE).el $(PACKAGE)-pkg.el
$(PACKAGE).info dir
+ @$(TAR) -c -v -f $(ARCHIVE_NAME).tar --transform
"s@^@$(ARCHIVE_NAME)/@" $^
## Public targets
@@ -65,35 +66,45 @@ test:
@$(CASK) exec ert-runner $(TESTFLAGS)
.PHONY: clean
-clean:
+clean: clean-docs
$(info Remove all byte compiled Elisp files...)
@$(CASK) clean-elc
$(info Remove build artefacts...)
- @$(RM) -f README ChangeLog $(ARCHIVE_NAME).info coverage-final.json
- @$(RM) -f $(ARCHIVE_NAME)-pkg.el $(ARCHIVE_NAME)-*.tar
+ @$(RM) README ChangeLog $(PACKAGE).info coverage-final.json
+ @$(RM) $(PACKAGE)-pkg.el $(PACKAGE)-*.tar
+
+.PHONY:
+clean-docs:
+ @$(MAKE) -C docs clean
.PHONY: package
-package: $(PACKAGE_NAME).tar
+package: $(ARCHIVE_NAME).tar
.PHONY: install
-install: $(PACKAGE_NAME).tar
+install: $(ARCHIVE_NAME).tar
@$(EMACS) --batch -l package -f package-initialize --eval \
- "(let ((debug-on-error t))(package-install-file
\"$(PWD)/$(PACKAGE_NAME).tar\"))"
+ "(let ((debug-on-error t))(package-install-file
\"$(PWD)/$(ARCHIVE_NAME).tar\"))"
+
+.PHONY: info
+info:
+ @$(MAKE) -C docs info
.PHONY: help
help: .title
@echo 'Run "make init" first to install and update all local
dependencies.'
@echo ''
@echo 'Available targets:'
- @echo ' help: Show this help and exit'
- @echo ' init: Initialize the project (has to be launched first)'
- @echo ' checkdoc: Checks BNF Mode code for errors in the documentation'
- @echo ' build: Byte compile BNF Mode package'
- @echo ' test: Run the non-interactive unit test suite'
- @echo ' clean: Remove all byte compiled Elisp files as well as
build'
- @echo ' artefacts'
- @echo ' package: Build package'
- @echo ' install: Install BNF Mode'
+ @echo ' help: Show this help and exit'
+ @echo ' init: Initialize the project (has to be launched first)'
+ @echo ' checkdoc: Checks BNF Mode code for errors in the
documentation'
+ @echo ' build: Byte compile BNF Mode package'
+ @echo ' test: Run the non-interactive unit test suite'
+ @echo ' clean: Remove all byte compiled Elisp files,
documentation,'
+ @echo ' build artefacts and tarball'
+ @echo ' clean-docs: Remove all ganerated documentation'
+ @echo ' package: Build package'
+ @echo ' install: Install BNF Mode'
+ @echo ' info: Generate info manual'
@echo ''
@echo 'Available programs:'
@echo ' $(CASK): $(if $(HAVE_CASK),yes,no)'
diff --git a/default.mk b/default.mk
index 3a36193..e48a3ba 100644
--- a/default.mk
+++ b/default.mk
@@ -22,6 +22,9 @@ CASK ?= cask
PANDOC ?= pandoc
TAR ?= tar
+INSTALL_INFO ?= $(shell command -v ginstall-info || printf install-info)
+MAKEINFO ?= makeinfo
+
EMACSBATCH = $(EMACS) -Q --batch -L . $(EMACSFLAGS)
RUNEMACS =
@@ -40,10 +43,12 @@ PANDOCLAGS ?= --fail-if-warnings \
--atx-headers \
-f org+empty_paragraphs
-ARCHIVE_NAME = bnf-mode
-PACKAGE_NAME = $(ARCHIVE_NAME)-$(VERSION)
+PACKAGE = bnf-mode
+ARCHIVE_NAME = $(PACKAGE)-$(VERSION)
VERSION = 0.4.4
SRCS = bnf-mode.el
OBJS = $(SRCS:.el=.elc)
+
+INFOPAGES = $(addsuffix .info,$(PACKAGE))
diff --git a/default.mk b/docs/Makefile
similarity index 51%
copy from default.mk
copy to docs/Makefile
index 3a36193..8f6630b 100644
--- a/default.mk
+++ b/docs/Makefile
@@ -11,39 +11,27 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-
+#
# You should have received a copy of the GNU General Public License
# along with this file. If not, see <https://www.gnu.org/licenses/>.
-TOP := $(dir $(lastword $(MAKEFILE_LIST)))
-
-EMACS ?= emacs
-CASK ?= cask
-PANDOC ?= pandoc
-TAR ?= tar
-
-EMACSBATCH = $(EMACS) -Q --batch -L . $(EMACSFLAGS)
-RUNEMACS =
+include ../default.mk
-HAVE_CASK := $(shell sh -c "command -v $(CASK)")
-ifndef HAVE_CASK
-$(warning "$(CASK) is not available. Please run make help")
-RUNEMACS = $(EMACSBATCH)
-else
-RUNEMACS = $(CASK) exec $(EMACSBATCH)
-endif
+.PHONY: all
+all: info
-EMACSFLAGS ?=
-TESTFLAGS ?= --reporter ert+duration
-PANDOCLAGS ?= --fail-if-warnings \
- --reference-links \
- --atx-headers \
- -f org+empty_paragraphs
+.PHONY: info
+info: $(INFOPAGES) dir
-ARCHIVE_NAME = bnf-mode
-PACKAGE_NAME = $(ARCHIVE_NAME)-$(VERSION)
+%.info: %.texi
+ $(info Generating $@)
+ @$(MAKEINFO) --no-split $< -o $@
-VERSION = 0.4.4
+dir: $(INFOPAGES)
+ $(info Generating dir)
+ @echo $^ | xargs -n 1 $(INSTALL_INFO) --dir=$@
-SRCS = bnf-mode.el
-OBJS = $(SRCS:.el=.elc)
+.PHONY:
+clean:
+ $(info Cleaning documentation...)
+ @$(RM) dir $(INFOPAGES)
diff --git a/docs/bnf-mode.texi b/docs/bnf-mode.texi
new file mode 100644
index 0000000..e69de29
- [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, 2020/03/03
- [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 <=
- [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
- [elpa] externals/bnf-mode 934fba4 21/22: Update change log, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 4bc5d15 17/22: Move documentation to the project root, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode eec34c9 19/22: Merge pull request #11 from sergeyklay/info-page, Stefan Monnier, 2020/03/03