branch: scratch/editorconfig-cc
commit f8c0b1240d9e019ca8c43ad676c5302711abf3e3
Author: 10sr <[email protected]>
Commit: Stefan Monnier <[email protected]>
Update Makefile for info generation
---
Makefile | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 0808bd842d..30dd25f663 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,10 @@
# -*- Makefile -*-
-TEXI_TOP := EditorConfig Emacs Plugin
+TEXI_CHAPTER := EditorConfig Emacs Plugin
EMACS = emacs
PANDOC = pandoc
+AWK = awk
PROJECT_ROOT_DIR = $(PWD)
ERT_TESTS = $(wildcard $(PROJECT_ROOT_DIR)/ert-tests/*.el)
@@ -26,9 +27,9 @@ doc: doc/editorconfig.texi
doc/editorconfig.texi: README.md doc/header.txt
mkdir -p doc
tail -n +4 $< | $(PANDOC) -s -f markdown -t texinfo -o [email protected]
- cat doc/header.txt [email protected] >$@
- sed -i.bak -e 's/^@top .*/@top ${TEXI_TOP}/' $@
- rm -f [email protected] [email protected]
+ $(AWK) 'f{print} /^@chapter $(TEXI_CHAPTER)/{f=1;print}' [email protected]
>[email protected]
+ cat doc/header.txt [email protected] >$@
+ rm -f [email protected] [email protected]
test: test-ert test-core test-metadata $(OBJS)
$(EMACS) $(BATCHFLAGS) -l editorconfig.el