xref: /unit/docs/Makefile (revision 1887:0a32914bf7bf)
11312Svbart@nginx.com#!/usr/bin/make
2369Sdefan@nginx.com
3369Sdefan@nginx.comDEST=	../build
4369Sdefan@nginx.comXSLS?=	xslscript.pl
5369Sdefan@nginx.com
6373Sdefan@nginx.comPACKAGES=	unit 							\
7373Sdefan@nginx.com		unit-php 						\
8469Sigor@sysoev.ru		unit-python unit-python2.7 unit-python3.4		\
9902Sdefan@nginx.com		unit-python3.5 unit-python3.6 unit-python3.7		\
10*1887Sdefan@nginx.com		unit-python3.8 unit-python3.9				\
11672Sdefan@nginx.com		unit-go unit-go1.7 unit-go1.8 unit-go1.9 unit-go1.10	\
121290Sdefan@nginx.com		unit-go1.12 unit-go1.13					\
13600Sdefan@nginx.com		unit-perl						\
14991Svbart@nginx.com		unit-ruby						\
15*1887Sdefan@nginx.com		unit-jsc-common unit-jsc8 unit-jsc10 unit-jsc11		\
16*1887Sdefan@nginx.com		unit-jsc13 unit-jsc14 unit-jsc15 unit-jsc16 unit-jsc17
17469Sigor@sysoev.ru
181734Sdefan@nginx.comCURDATE:=$(shell date +"%Y-%m-%d")
191734Sdefan@nginx.comCURTIME:=$(shell date +"%H:%M:%S %z")
201734Sdefan@nginx.com
21369Sdefan@nginx.com
22369Sdefan@nginx.comall:		changes changelogs
23369Sdefan@nginx.com
24369Sdefan@nginx.comchanges:	$(DEST)/CHANGES
25369Sdefan@nginx.com
26369Sdefan@nginx.comchangelogs:	$(addsuffix .rpm-changelog, $(addprefix $(DEST)/, $(PACKAGES))) \
27369Sdefan@nginx.com		$(addsuffix .deb-changelog, $(addprefix $(DEST)/, $(PACKAGES)))
28369Sdefan@nginx.com
29369Sdefan@nginx.com$(DEST)/CHANGES:		changes.dtd				\
30369Sdefan@nginx.com				changes.xml				\
31369Sdefan@nginx.com				change_log_conf.xml			\
32369Sdefan@nginx.com				changes.xslt
33369Sdefan@nginx.com
34369Sdefan@nginx.com	mkdir -p $(DEST)
35369Sdefan@nginx.com
36369Sdefan@nginx.com	xmllint --noout --valid changes.xml
37369Sdefan@nginx.com	xsltproc --stringparam format generic				\
381734Sdefan@nginx.com		--stringparam curdate '$(CURDATE)'			\
391734Sdefan@nginx.com		--stringparam curtime '$(CURTIME)'			\
40369Sdefan@nginx.com		-o $@ changes.xslt changes.xml
41369Sdefan@nginx.com
42369Sdefan@nginx.com$(DEST)/%.rpm-changelog:	changes.dtd 				\
43369Sdefan@nginx.com				changes.xml 				\
44369Sdefan@nginx.com				change_log_conf.xml 			\
45369Sdefan@nginx.com				changes.xslt
46369Sdefan@nginx.com	mkdir -p $(DEST)
47369Sdefan@nginx.com	xmllint --noout --valid changes.xml
48369Sdefan@nginx.com	xsltproc --stringparam pkgname $* --stringparam format rpm	\
491734Sdefan@nginx.com		--stringparam curdate '$(CURDATE)'			\
501734Sdefan@nginx.com		--stringparam curtime '$(CURTIME)'			\
51369Sdefan@nginx.com		-o $@ changes.xslt changes.xml
52369Sdefan@nginx.com
53369Sdefan@nginx.com$(DEST)/%.deb-changelog:	changes.dtd 				\
54369Sdefan@nginx.com				changes.xml 				\
55369Sdefan@nginx.com				change_log_conf.xml 			\
56369Sdefan@nginx.com				changes.xslt
57369Sdefan@nginx.com	mkdir -p $(DEST)
58369Sdefan@nginx.com	xmllint --noout --valid changes.xml
59369Sdefan@nginx.com	xsltproc --stringparam pkgname $* --stringparam format deb	\
601734Sdefan@nginx.com		--stringparam curdate '$(CURDATE)'			\
611734Sdefan@nginx.com		--stringparam curtime '$(CURTIME)'			\
62369Sdefan@nginx.com		-o $@ changes.xslt changes.xml
63369Sdefan@nginx.com
64369Sdefan@nginx.comchanges.xslt:	changes.xsls
65369Sdefan@nginx.com	$(XSLS) -o $@ $<
66369Sdefan@nginx.com
67369Sdefan@nginx.comclean:
68369Sdefan@nginx.com	rm -rf $(DEST)
69