[nginx] svn commit: r4777 - trunk/docs
ru at nginx.com
ru at nginx.com
Tue Jul 31 21:49:23 UTC 2012
Author: ru
Date: 2012-07-31 21:49:23 +0000 (Tue, 31 Jul 2012)
New Revision: 4777
URL: http://trac.nginx.org/nginx/changeset/4777/nginx
Log:
Simplified makefile that builds CHANGES.
Modified:
trunk/docs/GNUmakefile
Modified: trunk/docs/GNUmakefile
===================================================================
--- trunk/docs/GNUmakefile 2012-07-31 21:47:56 UTC (rev 4776)
+++ trunk/docs/GNUmakefile 2012-07-31 21:49:23 UTC (rev 4777)
@@ -5,25 +5,7 @@
TEMP= tmp
CP= $(HOME)/java
-define XSLScript
- java -cp $(CP)/xsls/saxon.jar:$(CP)/xsls/xsls.jar \
- com.pault.StyleSheet \
- -x com.pault.XX -y com.pault.XX \
- $(1) docs/xsls/dump.xsls \
- | sed 's/ *$$//;/^ *$$/N;/\n *$$/D' > $(2)
- if [ ! -s $(2) ]; then rm $(2); fi; test -s $(2)
-endef
-
-define XSLT
- xmllint --noout --valid $2
- xsltproc -o $3 \
- $(shell echo $4 \\
- | sed -e "s/\([^= ]*\)=\([^= ]*\)/--param \1 \"'\2'\"/g") \
- $1 $2
-endef
-
-
all: changes
changes: $(TEMP)/$(NGINX)/CHANGES.ru \
@@ -34,24 +16,28 @@
docs/xml/change_log_conf.xml \
docs/xslt/changes.xslt
- test -d $(TEMP)/$(NGINX) || mkdir -p $(TEMP)/$(NGINX)
+ mkdir -p $(TEMP)/$(NGINX)
xsltproc --stringparam lang ru \
- -o $(TEMP)/$(NGINX)/CHANGES.ru \
- docs/xslt/changes.xslt docs/xml/nginx/changes.xml
+ -o $@ docs/xslt/changes.xslt docs/xml/nginx/changes.xml
$(TEMP)/$(NGINX)/CHANGES: docs/xml/nginx/changes.xml \
docs/xml/change_log_conf.xml \
docs/xslt/changes.xslt
- test -d $(TEMP)/$(NGINX) || mkdir -p $(TEMP)/$(NGINX)
+ mkdir -p $(TEMP)/$(NGINX)
xsltproc --stringparam lang en \
- -o $(TEMP)/$(NGINX)/CHANGES \
- docs/xslt/changes.xslt docs/xml/nginx/changes.xml
+ -o $@ docs/xslt/changes.xslt docs/xml/nginx/changes.xml
-docs/xslt/changes.xslt: docs/xsls/changes.xsls
+docs/xslt/changes.xslt: docs/xsls/changes.xsls docs/xsls/dump.xsls
- $(call XSLScript, docs/xsls/changes.xsls, $@)
+ java -cp $(CP)/xsls/saxon.jar:$(CP)/xsls/xsls.jar \
+ com.pault.StyleSheet \
+ -x com.pault.XX -y com.pault.XX \
+ $< docs/xsls/dump.xsls \
+ | sed 's/ *$$//;/^ *$$/N;/\n *$$/D' > $@
+
+ if [ ! -s $@ ]; then rm $@; fi; test -s $@
More information about the nginx-devel
mailing list