]> mj.ucw.cz Git - libucw.git/commitdiff
Doc. system: Hack around Makefile inexpressiveness.
authorMartin Mares <mj@ucw.cz>
Tue, 9 Sep 2008 10:32:43 +0000 (12:32 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 9 Sep 2008 10:32:43 +0000 (12:32 +0200)
build/Makebottom

index 772b4cbcf9d679ea8ca52ce2f3535ff16fc2fd9e..ef5d75cfdcdff7d37c281b74f34d833432411f25 100644 (file)
@@ -198,12 +198,14 @@ $(o)/%.html: $(o)/%.txt
        $(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 $<
 
-$(patsubst %.html,%.txt,$(DOC_INDICES)): $(o)/%.txt:
+# 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
+# and .deflist, so we always use the .txt's in dependencies.
+$(patsubst %.html,%.txt,$(DOC_INDICES)): $(o)/%.txt: $(patsubst %.html,%.txt,$(DOCS))
        $(M)"DOC-DEFS $@"
        $(Q)echo $@: $(DOC_HEAD) $(DOC_LIST) >> $(o)/depend.new
        $(Q)$(s)/build/doc-defs $(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)"DOC-EXT $<"
        $(Q)$(s)/build/doc-extract $< $@ $(o)/depend.new $(s) $(patsubst %.txt,%.deflist,$@)