2 ## Build procedure for www.openssl.org
5 CHECKOUTS = /var/cache/openssl/checkouts
7 SNAP = $(CHECKOUTS)/openssl
8 ## Where releases are found.
9 RELEASEDIR = /var/www/openssl/source
12 SERIES=1.1.1 1.1.0 1.0.2
14 OLDSERIES=1.0.1 1.0.0 0.9.8 0.9.7 0.9.6
15 ## Current series with newer and older manpage layout
16 ## (when the number of old man layout releases drop to none, this goes away)
18 OLDMANSERIES=1.1.0 1.0.2
20 # All simple generated files.
21 SIMPLE = newsflash.inc sitemap.txt \
22 community/committers.inc \
23 community/omc.inc community/omc-alumni.inc \
24 docs/faq.inc docs/fips.inc \
25 docs/OpenSSLStrategicArchitecture.html \
26 docs/OpenSSL300Design.html \
29 $(foreach S,$(SERIES),news/openssl-$(S)-notes.inc) \
30 $(foreach S,$(SERIES),news/openssl-$(S)-notes.html) \
32 news/vulnerabilities.inc \
33 $(foreach S,$(SERIES) $(OLDSERIES),news/vulnerabilities-$(S).inc) \
37 source/old/0.9.x/index.inc \
38 source/old/1.0.0/index.inc \
39 source/old/1.0.1/index.inc \
40 source/old/1.0.2/index.inc \
41 source/old/1.1.0/index.inc \
42 source/old/1.1.1/index.inc \
43 source/old/fips/index.inc \
52 all: suball manmaster mancross
54 suball: $(SIMPLE) $(SRCLISTS)
56 relupd: suball manpages mancross
59 rm -f $(SIMPLE) $(SRCLISTS)
62 hack-source_htaccess: all
67 # $(1) = input directory in CHECKOUTS, $(2) = release version
71 @mkdir -p docs/man$(2) \
76 ./bin/mk-manpages $(CHECKOUTS)/$(1)/doc $(2) docs/man$(2)
77 ./bin/mk-apropos docs/man$(2)/man1 > docs/man$(2)/man1/index.inc
78 ./bin/mk-apropos docs/man$(2)/man3 > docs/man$(2)/man3/index.inc
79 ./bin/mk-apropos docs/man$(2)/man5 > docs/man$(2)/man5/index.inc
80 ./bin/mk-apropos docs/man$(2)/man7 > docs/man$(2)/man7/index.inc
81 ./bin/from-tt -d docs/man$(2)/man1 releases='$(SERIES)' release='$(2)' \
82 < docs/sub-man1-index.html.tt > docs/man$(2)/man1/index.html
83 ./bin/from-tt -d docs/man$(2)/man1 releases='$(SERIES)' release='$(2)' \
84 < docs/sub-man3-index.html.tt > docs/man$(2)/man3/index.html
85 ./bin/from-tt -d docs/man$(2)/man1 releases='$(SERIES)' release='$(2)' \
86 < docs/sub-man5-index.html.tt > docs/man$(2)/man5/index.html
87 ./bin/from-tt -d docs/man$(2)/man1 releases='$(SERIES)' release='$(2)' \
88 < docs/sub-man7-index.html.tt > docs/man$(2)/man7/index.html
89 ./bin/from-tt -d docs/man$(2) releases='$(SERIES)' release='$(2)' \
90 < docs/sub-index.html.tt > docs/man$(2)/index.html
92 # $(1) = release version
95 ./bin/mk-manmap docs/man$(1) > docs/man$(1)/.htaccess
98 $(eval $(call makemanpages,openssl,master))
99 $(foreach S,$(SERIES),$(eval $(call makemanpages,openssl-$(S)-stable,$(S))))
100 $(foreach S,$(OLDMANSERIES),$(eval $(call makeoldmanmap,$(S))))
102 manmaster: manpages-master
103 manpages: $(foreach S,$(NEWMANSERIES),manpages-$(S)) \
104 $(foreach S,$(OLDMANSERIES),manpages-$(S) manmap-$(S))
107 ./bin/mk-mancross master $(SERIES)
109 docs/manpages.html: docs/manpages.html.tt
111 ./bin/from-tt releases='master $(SERIES)' docs/manpages.html.tt
113 ## $(SIMPLE) -- SIMPLE GENERATED FILES
114 .PHONY: sitemap community/committers.inc community/omc.inc community/omc-alumni.inc
115 newsflash.inc: news/newsflash.inc
120 ./bin/mk-sitemap master $(SERIES) > sitemap.txt
122 community/committers.inc:
124 wget -q https://api.openssl.org/0/Group/commit/Members
125 ./bin/mk-committers <Members >$@
129 ./bin/mk-omc -n -e -l -p -t 'OMC Members' omc omc-inactive > $@
130 community/omc-alumni.inc:
131 ./bin/mk-omc -n -l -t 'OMC Alumni' omc-alumni omc-emeritus > $@
133 docs/faq.inc: $(wildcard docs/faq-[0-9]-*.txt) bin/mk-faq
135 ./bin/mk-faq docs/faq-[0-9]-*txt >$@
136 docs/fips.inc: $(wildcard docs/fips/*) bin/mk-filelist
138 ./bin/mk-filelist docs/fips fips/ '*' >$@
140 news/changelog.inc: news/changelog.txt bin/mk-changelog
142 ./bin/mk-changelog <news/changelog.txt >$@
143 news/changelog.html: news/changelog.html.tt news/changelog.inc
145 ./bin/from-tt 'releases=$(SERIES)' $<
146 news/changelog.html: $(foreach S,$(SERIES),news/cl$(subst .,,$(S)).txt)
148 # $(1) = output file, $(2) = source directory in CHECKOUTS
149 define mknews_changelogtxt
150 news/$(1): $(CHECKOUTS)/$(2)/CHANGES
154 $(eval $(call mknews_changelogtxt,changelog.txt,openssl))
155 $(foreach S,$(SERIES),\
156 $(eval $(call mknews_changelogtxt,cl$(subst .,,$(S)).txt,openssl-$(S)-stable)))
158 # $(1) = release version
159 define mknews_noteshtml
160 news/openssl-$(1)-notes.html: news/openssl-notes.html.in
162 sed -e 's|@VERSION@|$(1)|g' < $$< > $$@
163 news/openssl-$(1)-notes.inc: $(CHECKOUTS)/openssl-$(1)-stable/NEWS bin/mk-notes
165 ./bin/mk-notes $(1) < $(CHECKOUTS)/openssl-$(1)-stable/NEWS > $$@
167 $(foreach S,$(SERIES),$(eval $(call mknews_noteshtml,$(S))))
169 news/newsflash.inc: news/newsflash.txt
172 -e 's@^@<tr><td class="d">@' \
173 -e 's@: @</td><td class="t">@' \
174 -e 's@$$@</td></tr>@'
176 # $(1) = output file mod, $(2) = release version switch, $(3) = release version
177 define mknews_vulnerability
178 news/vulnerabilities$(1).inc: bin/mk-cvepage news/vulnerabilities.xml
180 ./bin/mk-cvepage -i news/vulnerabilities.xml $(2) > $$@
182 $(eval $(call mknews_vulnerability,,))
183 $(foreach S,$(SERIES) $(OLDSERIES),$(eval $(call mknews_vulnerability,-$(S),-b $(S))))
185 source/.htaccess: $(wildcard source/openssl-*.tar.gz) bin/mk-latest
187 ./bin/mk-latest source >$@
188 source/index.inc: $(wildcard $(RELEASEDIR)/openssl-*.tar.gz) bin/mk-filelist
190 ./bin/mk-filelist $(RELEASEDIR) '' 'openssl-*.tar.gz' >$@
192 ## $(SRCLISTS) -- LISTS OF SOURCES
193 source/old/0.9.x/index.inc: $(wildcard source/old/0.9.x/*.gz) bin/mk-filelist
195 ./bin/mk-filelist source/old/0.9.x '' '*.gz' >$@
196 source/old/1.0.0/index.inc: $(wildcard source/old/1.0.0/*.gz) bin/mk-filelist
198 ./bin/mk-filelist source/old/1.0.0 '' '*.gz' >$@
199 source/old/1.0.1/index.inc: $(wildcard source/old/1.0.1/*.gz) bin/mk-filelist
201 ./bin/mk-filelist source/old/1.0.1 '' '*.gz' >$@
202 source/old/1.0.2/index.inc: $(wildcard source/old/1.0.2/*.gz) bin/mk-filelist
204 ./bin/mk-filelist source/old/1.0.2 '' '*.gz' >$@
205 source/old/1.1.0/index.inc: $(wildcard source/old/1.1.0/*.gz) bin/mk-filelist
207 ./bin/mk-filelist source/old/1.1.0 '' '*.gz' >$@
208 source/old/1.1.1/index.inc: $(wildcard source/old/1.1.1/*.gz) bin/mk-filelist
210 ./bin/mk-filelist source/old/1.1.1 '' '*.gz' >$@
211 source/old/fips/index.inc: $(wildcard source/old/fips/*.gz) bin/mk-filelist
213 ./bin/mk-filelist source/old/fips '' '*.gz' >$@
215 # Because these the indexes of old tarballs will inevitably be newer
216 # than the tarballs that are moved into their respective directory,
217 # we must declare them phony, or they will not be regenerated when
220 source/old/1.0.1/index.inc source/old/1.0.2/index.inc \
221 source/old/1.1.0/index.inc source/old/1.1.1/index.inc \
222 source/old/fips/index.inc