comparison 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
comparison
equal deleted inserted replaced
733:7f8e85a50845 734:99ea52dbb4d4
81 news: $(OUT)/index.html $(OUT)/index.rss 81 news: $(OUT)/index.html $(OUT)/index.rss
82 arx: $(OUT)/2011.html $(OUT)/2010.html $(OUT)/2009.html 82 arx: $(OUT)/2011.html $(OUT)/2010.html $(OUT)/2009.html
83 404: $(OUT)/404.html 83 404: $(OUT)/404.html
84 84
85 85
86 include $(foreach lang, $(LANGS), xml/$(lang)/GNUmakefile) 86 define lang-specific
87 87
88 TOP=
89 DOCS=
90 REFS=
91 FAQ=
92 include xml/$(lang)/GNUmakefile
93
94 $(lang): \
95 $$(foreach f,index $$(TOP),$(OUT)/$(lang)/$$(f).html) \
96 $$(foreach f,index $$(DOCS) $$(REFS) $$(FAQ), \
97 $(OUT)/$(lang)/docs/$$(f).html)
98
99 $(OUT)/$(lang)/docs/index.html: \
100 $$(foreach f,$$(DOCS) $$(REFS), \
101 $(OUT)/$(lang)/docs/$$(f).html)
102
103 $(OUT)/$(lang)/docs/faq.html: \
104 $$(foreach f,$$(FAQ),$(OUT)/$(lang)/docs/$$(f).html)
105
106 xml/$(lang)/docs/dirindex.xml: \
107 $$(foreach f,$$(REFS),xml/$(lang)/docs/$$(f).xml) \
108 xslt/dirindex.xslt
109 echo "<modules>$$(patsubst %, \
110 <module name=\"%\"/>, $$(filter %.xml,$$^))</modules>" | \
111 xsltproc -o - --stringparam LANG $(lang) \
112 xslt/dirindex.xslt - | \
113 sed 's;xml/[^/]*/docs/;;g' > $$@
114
115 endef
116
117 $(foreach lang, $(LANGS), $(eval $(call lang-specific)))
88 118
89 $(OUT)/index.html: \ 119 $(OUT)/index.html: \
90 xml/index.xml \ 120 xml/index.xml \
91 $(NEWS_DEPS) 121 $(NEWS_DEPS)
92 $(call XSLT, xslt/news.xslt, $<, $@) 122 $(call XSLT, xslt/news.xslt, $<, $@)