Mercurial > hg > nginx-site
comparison GNUmakefile @ 124:73df20b5963c
xmllint is now always run.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Fri, 21 Oct 2011 06:18:04 +0000 |
parents | 233f9c8c23e5 |
children | 8437e7f55c4d |
comparison
equal
deleted
inserted
replaced
123:7db449e89e92 | 124:73df20b5963c |
---|---|
17 | sed 's/ *$$//;/^ *$$/N;/\n *$$/D' > $(2) | 17 | sed 's/ *$$//;/^ *$$/N;/\n *$$/D' > $(2) |
18 | 18 |
19 if [ ! -s $(2) ]; then rm $(2); fi; test -s $(2) | 19 if [ ! -s $(2) ]; then rm $(2); fi; test -s $(2) |
20 endef | 20 endef |
21 | 21 |
22 define XMLLINT | |
23 xmllint --noout --valid $1 | |
24 endef | |
25 | |
26 define XSLT | 22 define XSLT |
23 xmllint --noout --valid $2 | |
27 xsltproc -o $3 \ | 24 xsltproc -o $3 \ |
28 $(shell echo $4 \ | 25 $(shell echo $4 \ |
29 | sed -e "s/\([^= ]*\)=\([^= ]*\)/--param \1 \"'\2'\"/g") \ | 26 | sed -e "s/\([^= ]*\)=\([^= ]*\)/--param \1 \"'\2'\"/g") \ |
30 $1 $2 | 27 $1 $2 |
31 endef | 28 endef |
146 | 143 |
147 .SECONDARY: | 144 .SECONDARY: |
148 | 145 |
149 $(OUT)/%.html: xml/%.xml \ | 146 $(OUT)/%.html: xml/%.xml \ |
150 $(ARTICLE_DEPS) | 147 $(ARTICLE_DEPS) |
151 $(call XMLLINT, $<) | |
152 $(call XSLT, xslt/article.xslt, $<, $@) | 148 $(call XSLT, xslt/article.xslt, $<, $@) |
153 | 149 |
154 | 150 |
155 xslt/%.xslt: xsls/%.xsls \ | 151 xslt/%.xslt: xsls/%.xsls \ |
156 xsls/dump.xsls | 152 xsls/dump.xsls |