]> mj.ucw.cz Git - libucw.git/commitdiff
Doc system: build system for deflists and indeces
authorMichal Vaner <vorner@ucw.cz>
Sun, 7 Sep 2008 15:16:10 +0000 (17:16 +0200)
committerMichal Vaner <vorner@ucw.cz>
Sun, 7 Sep 2008 15:16:10 +0000 (17:16 +0200)
Makefile rules for building documentation indeces

build/Makebottom

index 1b62b06aba9c855bce308923ccc5f1511c930969..310465917dddd9ecdaf504b9c134130b927979d8 100644 (file)
@@ -16,7 +16,7 @@ programs: $(PROGS)
 datafiles: $(DATAFILES)
 tests: $(TESTS)
 configs: $(addprefix run/$(CONFIG_DIR)/,$(CONFIGS))
-docs: runtree $(DOCS)
+docs: runtree $(DOCS) $(DOC_INDEXES)
 
 tags:
        etags `find . -name "*.[ch]"`
@@ -197,9 +197,15 @@ $(o)/%.html: $(o)/%.txt
        $(M)"AD $< -> $@"
        $(Q)asciidoc -e -f $(s)/build/asciidoc.conf -f $(s)/build/asciidoc-xhtml.conf -f /etc/asciidoc/asciidoc.conf -f /etc/asciidoc/xhtml11.conf $<
 
-$(o)/%.txt: $(s)/%.txt
+$(patsubst %.html,%.txt,$(DOC_INDEXES)): $(o)/%.txt:
+       $(M)"DD -> $@"
+       $(Q)echo $@: $(DOC_HEAD) $(DOC_LIST) >> $(o)/depend.new
+       $(Q)$(s)/build/def-doc.pl $(DOC_HEAD) $@ $(DOC_LIST)
+
+#FIXME: this one outputs .deflist too. How do I specify that one run of the rule has multiple target files?
+$(patsubst %.html,%.txt,$(DOCS)): $(o)/%.txt: $(s)/%.txt
        $(M)"ED $< -> $@"
-       $(Q)$(s)/build/extract-doc.pl $< $@ $(o)/depend.new $(s)
+       $(Q)$(s)/build/extract-doc.pl $< $@ $(o)/depend.new $(s) $(patsubst %.txt,%.deflist,$@)
 
 # Default installation target