docs/Makefile: make doc generation more flexible.
This commit is contained in:
parent
c6309dd0af
commit
9a855dcade
1 changed files with 6 additions and 5 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
|
|
||||||
ASCIIDOC = asciidoc
|
ASCIIDOC = asciidoc
|
||||||
|
|
||||||
HTML_DOCS = index.html api-notify.html strbuf.html xalloc.html rbtree.html \
|
SOURCE_DOCS = $(subst index.txt,,$(wildcard *.txt))
|
||||||
log.html fscrawl.html path.html
|
|
||||||
|
HTML_DOCS = index.html $(patsubst %.txt,%.html,$(SOURCE_DOCS))
|
||||||
|
|
||||||
ifndef VERBOSE
|
ifndef VERBOSE
|
||||||
QUIET_ASCIIDOC = @echo ' ' GEN $@;
|
QUIET_ASCIIDOC = @echo ' ' GEN $@;
|
||||||
|
|
@ -10,14 +11,14 @@ ifndef VERBOSE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY : clean
|
.PHONY : clean
|
||||||
all : $(HTML_DOCS)
|
all : html
|
||||||
html : $(HTML_DOCS)
|
html : $(HTML_DOCS)
|
||||||
|
|
||||||
%.html : %.txt
|
%.html : %.txt
|
||||||
$(QUIET_ASCIIDOC)$(ASCIIDOC) -b xhtml11 -o $@ $<
|
$(QUIET_ASCIIDOC)$(ASCIIDOC) -b xhtml11 -o $@ $<
|
||||||
|
|
||||||
index.txt :
|
index.txt : $(SOURCE_DOCS)
|
||||||
$(QUIET_SCRIPT)$(shell ./genindex.sh index.txt)
|
$(QUIET_SCRIPT)$(shell ./genindex.sh index.txt)
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
$(RM) index.txt $(HTML_DOCS)
|
$(RM) index.txt *.html
|
||||||
|
|
|
||||||
Reference in a new issue