]> mj.ucw.cz Git - libucw.git/commitdiff
Doc. system: link docs under run directory
authorMichal Vaner <vorner@ucw.cz>
Sat, 4 Oct 2008 12:48:52 +0000 (14:48 +0200)
committerMichal Vaner <vorner@ucw.cz>
Sat, 4 Oct 2008 12:48:52 +0000 (14:48 +0200)
They are divided into modules, stored in run/doc/modulename. Only ucw
module exists now.

build/Makebottom
ucw/doc/Makefile

index 84db650cee5f201d16b402b071692d28908a4d96..bbb62b11dd0afeeffb3aae6ffca2782d58caa776 100644 (file)
@@ -3,7 +3,7 @@
 
 # The run tree
 
-runtree: run/.tree-stamp $(addsuffix /.dir-stamp,$(addprefix $(o)/,$(DIRS)))
+runtree: run/.tree-stamp $(addsuffix /.dir-stamp,$(addprefix $(o)/,$(DIRS)) $(addprefix run/$(DOCDIR)/,$(DOC_MODULES)))
 
 run/.tree-stamp: $(o)/config.mk
        $(M)Creating runtree
@@ -194,9 +194,13 @@ $(DATAFILES): $(o)/%: $(s)/%
 
 # Rules for documentation
 
-$(o)/%.html: $(o)/%.txt $(s)/build/asciidoc.conf $(s)/build/asciidoc-xhtml.conf
+
+DOCDIR=doc
+
+$(o)/%.html: $(o)/%.txt $(s)/build/asciidoc.conf $(s)/build/asciidoc-xhtml.conf run/$(DOCDIR)/$(DOC_MODULE)/.dir-stamp
        $(M)"DOC-HTML $<"
        $(Q)asciidoc -e -f $(s)/build/asciidoc.conf -f $(s)/build/asciidoc-xhtml.conf -f /etc/asciidoc/asciidoc.conf -f /etc/asciidoc/xhtml11.conf $<
+       $(Q)$(call symlink,$@,run/$(DOCDIR)/$(DOC_MODULE))
 
 # In reality, we do not depend on the .txt files, but on the corresponding .deflist's.
 # However, the Makefile language cannot express that doc-extract generates both .txt
index d031d8b97ef42124a9370a4ff3a9c976173225f7..5fdf0375b620d1d8bc09f970f687c60a6e8abd61 100644 (file)
@@ -4,9 +4,12 @@ DIRS+=ucw/doc
 
 UCW_DOCS=fastbuf index basecode hash docsys conf mempool
 UCW_INDEX=$(o)/ucw/doc/def_index.html
+UCW_DOCS_HTML=$(addprefix $(o)/ucw/doc/,$(addsuffix .html,$(UCW_DOCS)))
 
 $(UCW_INDEX): DOC_HEAD=$(s)/ucw/doc/def_index.txt
 $(UCW_INDEX): DOC_LIST=$(patsubst %,$(o)/ucw/doc/%.deflist,$(UCW_DOCS))
+$(UCW_INDEX) $(UCW_DOCS_HTML): DOC_MODULE=ucw
 
-DOCS+=$(addprefix $(o)/ucw/doc/,$(addsuffix .html,$(UCW_DOCS)))
+DOCS+=$(UCW_DOCS_HTML)
 DOC_INDICES+=$(UCW_INDEX)
+DOC_MODULES+=ucw