Mercurial > hg > nginx-site
diff GNUmakefile @ 734:99ea52dbb4d4
Moved all rules to the main makefile leaving language specific
makefiles with only the lists of translated documents.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 17 Oct 2012 14:30:05 +0000 |
parents | 76e876c58dc0 |
children | 9f2953d854fd |
line wrap: on
line diff
--- a/GNUmakefile Tue Oct 16 12:55:23 2012 +0000 +++ b/GNUmakefile Wed Oct 17 14:30:05 2012 +0000 @@ -83,8 +83,38 @@ 404: $(OUT)/404.html -include $(foreach lang, $(LANGS), xml/$(lang)/GNUmakefile) +define lang-specific + +TOP= +DOCS= +REFS= +FAQ= +include xml/$(lang)/GNUmakefile + +$(lang): \ + $$(foreach f,index $$(TOP),$(OUT)/$(lang)/$$(f).html) \ + $$(foreach f,index $$(DOCS) $$(REFS) $$(FAQ), \ + $(OUT)/$(lang)/docs/$$(f).html) +$(OUT)/$(lang)/docs/index.html: \ + $$(foreach f,$$(DOCS) $$(REFS), \ + $(OUT)/$(lang)/docs/$$(f).html) + +$(OUT)/$(lang)/docs/faq.html: \ + $$(foreach f,$$(FAQ),$(OUT)/$(lang)/docs/$$(f).html) + +xml/$(lang)/docs/dirindex.xml: \ + $$(foreach f,$$(REFS),xml/$(lang)/docs/$$(f).xml) \ + xslt/dirindex.xslt + echo "<modules>$$(patsubst %, \ + <module name=\"%\"/>, $$(filter %.xml,$$^))</modules>" | \ + xsltproc -o - --stringparam LANG $(lang) \ + xslt/dirindex.xslt - | \ + sed 's;xml/[^/]*/docs/;;g' > $$@ + +endef + +$(foreach lang, $(LANGS), $(eval $(call lang-specific))) $(OUT)/index.html: \ xml/index.xml \