GNUmakefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. VER= $(shell grep 'define NGINX_VERSION' src/core/nginx.h \
  2. | sed -e 's/^.*\"\(.*\)\"/\1/')
  3. NGINX= nginx-$(VER)
  4. TEMP= tmp
  5. CP= $(HOME)/java
  6. define XSLScript
  7. javavm -cp $(CP)/xsls/saxon.jar:$(CP)/xsls/xsls.jar \
  8. com.pault.StyleSheet \
  9. -x com.pault.XX -y com.pault.XX \
  10. $(1) docs/xsls/dump.xsls \
  11. | awk 'BEGIN{e=0}/^\n*$$/{e=1;next}{if(e){print"";e=0};print}' > $(2)
  12. if [ ! -s $(2) ]; then rm $(2); fi; test -s $(2)
  13. endef
  14. define XSLT
  15. xsltproc $(shell echo $4 \
  16. | sed -e "s/\([^= ]*\)=\([^= ]*\)/--param \1 \"'\2'\"/g") \
  17. $3 $1 \
  18. > $(HTML)/$(strip $(2))
  19. endef
  20. changes: $(TEMP)/$(NGINX)/CHANGES.ru \
  21. $(TEMP)/$(NGINX)/CHANGES
  22. $(TEMP)/$(NGINX)/CHANGES.ru: docs/xml/nginx/changes.xml \
  23. docs/xslt/changes.xslt
  24. test -d $(TEMP)/$(NGINX) || mkdir -p $(TEMP)/$(NGINX)
  25. xsltproc --param lang "'ru'" \
  26. -o $(TEMP)/$(NGINX)/CHANGES.ru \
  27. docs/xslt/changes.xslt docs/xml/nginx/changes.xml
  28. $(TEMP)/$(NGINX)/CHANGES: docs/xml/nginx/changes.xml \
  29. docs/xslt/changes.xslt
  30. test -d $(TEMP)/$(NGINX) || mkdir -p $(TEMP)/$(NGINX)
  31. xsltproc --param lang "'en'" \
  32. -o $(TEMP)/$(NGINX)/CHANGES \
  33. docs/xslt/changes.xslt docs/xml/nginx/changes.xml
  34. docs/xslt/changes.xslt: docs/xsls/changes.xsls
  35. $(call XSLScript, docs/xsls/changes.xsls, $@)