neovim/runtime/doc/Makefile
Justin M. Keyes ff18d3b827 build/doc: generate vimindex.html
This note in runtime/doc/Makefile explains the special-case:

    index.html is the starting point for HTML, but for the help files it
    is help.txt.  Therefore use vimindex.html for index.txt.

fix #8907
2018-08-25 15:25:49 +02:00

41 lines
892 B
Makefile

#
# Makefile for the Vim documentation on Unix
#
# If you get "don't know how to make scratch", first run make in the source
# directory. Or remove the include below.
AWK = awk
DOCS = $(wildcard *.txt)
HTMLS = $(DOCS:.txt=.html)
.SUFFIXES:
.SUFFIXES: .c .o .txt .html
# Awk version of .txt to .html conversion.
html: noerrors vimindex.html $(HTMLS)
@if test -f errors.log; then cat errors.log; fi
noerrors:
-rm -f errors.log
$(HTMLS): tags.ref
.txt.html:
$(AWK) -f makehtml.awk $< >$@
# index.html is the starting point for HTML, but for the help files it is
# help.txt. Therefore use vimindex.html for index.txt.
index.html: help.txt
$(AWK) -f makehtml.awk help.txt >index.html
vimindex.html: index.txt
$(AWK) -f makehtml.awk index.txt >vimindex.html
tags.ref tags.html: tags
$(AWK) -f maketags.awk tags >tags.html
clean:
-rm -f *.html tags.ref $(HTMLS) errors.log tags