summaryrefslogtreecommitdiffhomepage
path: root/docs/Makefile
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2017-10-19 17:48:58 +0300
committerAndrei Belov <defan@nginx.com>2017-10-19 17:48:58 +0300
commit8ca14503b7cecc90a499d13bf3cbcab4fd7e48d7 (patch)
tree4a2a7eda342c97a3fe8f88277d9c8db4229c6142 /docs/Makefile
parente7d81186b59b5e0681a099cc993365961b09752e (diff)
downloadunit-8ca14503b7cecc90a499d13bf3cbcab4fd7e48d7.tar.gz
unit-8ca14503b7cecc90a499d13bf3cbcab4fd7e48d7.tar.bz2
Added changelogs generation tools.
Diffstat (limited to 'docs/Makefile')
-rw-r--r--docs/Makefile50
1 files changed, 50 insertions, 0 deletions
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 00000000..c53ae895
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,50 @@
+
+VER= $(shell grep 'define NXT_VERSION' src/nxt_main.h \
+ | sed -e 's/^.*"\(.*\)".*/\1/')
+UNIT= unit-$(VER)
+DEST= ../build
+XSLS?= xslscript.pl
+
+PACKAGES= unit
+
+all: changes changelogs
+
+changes: $(DEST)/CHANGES
+
+changelogs: $(addsuffix .rpm-changelog, $(addprefix $(DEST)/, $(PACKAGES))) \
+ $(addsuffix .deb-changelog, $(addprefix $(DEST)/, $(PACKAGES)))
+
+$(DEST)/CHANGES: changes.dtd \
+ changes.xml \
+ change_log_conf.xml \
+ changes.xslt
+
+ mkdir -p $(DEST)
+
+ xmllint --noout --valid changes.xml
+ xsltproc --stringparam format generic \
+ -o $@ changes.xslt changes.xml
+
+$(DEST)/%.rpm-changelog: changes.dtd \
+ changes.xml \
+ change_log_conf.xml \
+ changes.xslt
+ mkdir -p $(DEST)
+ xmllint --noout --valid changes.xml
+ xsltproc --stringparam pkgname $* --stringparam format rpm \
+ -o $@ changes.xslt changes.xml
+
+$(DEST)/%.deb-changelog: changes.dtd \
+ changes.xml \
+ change_log_conf.xml \
+ changes.xslt
+ mkdir -p $(DEST)
+ xmllint --noout --valid changes.xml
+ xsltproc --stringparam pkgname $* --stringparam format deb \
+ -o $@ changes.xslt changes.xml
+
+changes.xslt: changes.xsls
+ $(XSLS) -o $@ $<
+
+clean:
+ rm -rf $(DEST)