branch: elpa/with-editor
commit 8d3d639325ef249af44bba1d7c812f301b0eecbf
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
make: use ox-texinfo+-update-version-strings
---
Makefile | 27 +++++++++++++--------------
with-editor.org | 5 ++++-
with-editor.texi | 4 +++-
3 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/Makefile b/Makefile
index c395343..98ee427 100644
--- a/Makefile
+++ b/Makefile
@@ -25,9 +25,6 @@ INSTALL_INFO ?= $(shell command -v ginstall-info ||
printf install-info)
MAKEINFO ?= makeinfo
MANUAL_HTML_ARGS ?= --css-ref /assets/page.css
-VERSION := $(shell test -e .git && \
- git tag | cut -c2- | sort --version-sort | tail -1)
-
all: lisp info
doc: info html html-dir pdf
@@ -35,12 +32,11 @@ help:
$(info make all - generate lisp and manual)
$(info make doc - generate most manual formats)
$(info make lisp - generate byte-code and autoloads)
- $(info make texi - generate texi manual)
+ $(info make texi - generate texi manual (see comments))
$(info make info - generate info manual)
$(info make html - generate html manual file)
$(info make html-dir - generate html manual directory)
$(info make pdf - generate pdf manual)
- $(info make bump-version - bump version strings)
$(info make authors - generate AUTHORS.md)
$(info make preview - preview html manual)
$(info make publish - publish html manual)
@@ -57,10 +53,6 @@ loaddefs: $(PKG)-autoloads.el
@printf "Compiling $<\n"
@$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) -f batch-byte-compile $<
-bump-version:
- @sed -i -e "s/\(#+SUBTITLE: for version \)[.0-9]*/\1$(VERSION)/"
$(PKG).org
-
-texi: $(PKG).texi
info: $(PKG).info dir
html: $(PKG).html
pdf: $(PKG).pdf
@@ -71,11 +63,18 @@ ORG_EVAL += --eval "(setq indent-tabs-mode nil)"
ORG_EVAL += --eval "(setq org-src-preserve-indentation nil)"
ORG_EVAL += --funcall org-texinfo-export-to-texinfo
-%.texi: %.org
- @printf "Generating $@\n"
- @$(EMACS) $(ORG_ARGS) $< $(ORG_EVAL)
- @printf "\n" >> $@
- @rm -f $@~
+# This target first bumps version strings in the Org source. The
+# necessary tools might be missing so other targets do not depend
+# on this target and it has to be run explicitly when appropriate.
+#
+# AMEND=t make texi Update manual to be amended to HEAD.
+# VERSION=N make texi Update manual for release.
+#
+.PHONY: texi
+texi:
+ @$(EMACS) $(ORG_ARGS) $(PKG).org $(ORG_EVAL)
+ @printf "\n" >> $(PKG).texi
+ @rm -f $(PKG).texi~
%.info: %.texi
@printf "Generating $@\n"
diff --git a/with-editor.org b/with-editor.org
index a3c547f..a96dc5e 100644
--- a/with-editor.org
+++ b/with-editor.org
@@ -7,7 +7,8 @@
#+TEXINFO_DIR_CATEGORY: Emacs
#+TEXINFO_DIR_TITLE: With-Editor: (with-editor).
#+TEXINFO_DIR_DESC: Using the Emacsclient as $EDITOR
-#+SUBTITLE: for version 2.5.11
+#+SUBTITLE: for version 2.7.0 (v2.7.0-4-gcacb41d+1)
+#+BIND: ox-texinfo+-before-export-hook ox-texinfo+-update-version-strings
#+TEXINFO_DEFFN: t
#+OPTIONS: H:4 num:4 toc:2
@@ -28,6 +29,8 @@ additional functionality which makes it useful even for
end-users, who
don't use Magit or another package which uses it internally.
#+BEGIN_QUOTE
+This manual is for With-Editor version 2.7.0 (v2.7.0-4-gcacb41d+1).
+
Copyright (C) 2015-2017 Jonas Bernoulli <[email protected]>
You can redistribute this document and/or modify it under the terms
diff --git a/with-editor.texi b/with-editor.texi
index 8b077ba..8a442c8 100644
--- a/with-editor.texi
+++ b/with-editor.texi
@@ -30,7 +30,7 @@ General Public License for more details.
@finalout
@titlepage
@title With-Editor User Manual
-@subtitle for version 2.5.11
+@subtitle for version 2.7.0 (v2.7.0-4-gcacb41d+1)
@author Jonas Bernoulli
@page
@vskip 0pt plus 1filll
@@ -59,6 +59,8 @@ additional functionality which makes it useful even for
end-users, who
don't use Magit or another package which uses it internally.
@quotation
+This manual is for With-Editor version 2.7.0 (v2.7.0-4-gcacb41d+1).
+
Copyright (C) 2015-2017 Jonas Bernoulli <jonas@@bernoul.li>
You can redistribute this document and/or modify it under the terms