2 ## Build procedure for www.openssl.org
5 CHECKOUTS = /var/cache/openssl/checkouts
7 SNAP = $(CHECKOUTS)/openssl
9 OMCDATA = $(CHECKOUTS)/data
10 ## Where releases are found.
11 RELEASEDIR = /srv/ftp/source
13 ## The OMC repository checkout can be used for dependencies.
14 ## By default, we don't assume it, as not everyone has access to it.
15 ## If you have it, do 'make PERSONDB=PATH/TO/omc/persondb.yaml' where
16 ## PATH/TO/omc is the checked out OMC repository.
17 ## We let it be FORCE by default... This forces the production of files
18 ## that depend on this database, instead of just conditionally.
21 ######################################################################
23 ## Release series. These represent our release branches, and are
24 ## our foundation for what should be built and how (often generated)
26 ## The numbers given here RULE
29 ## Current series. Variable names are numbered to indicate:
31 ## SERIES1 OpenSSL pre-3.0
32 ## SERIES3 OpenSSL 3.0 and on
33 ## SERIES The concatenation of the above, for ease of use
35 ## We mostly use $(SERIES) further down, but there are places where we
36 ## need to make the distinction, because certain files are produced
39 SERIES3=3.3 3.2 3.1 3.0
40 SERIES=$(SERIES3) $(SERIES1)
41 ## Older series. The second type is for source listings
42 OLDSERIES=1.1.1 1.1.0 1.0.2 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6
43 OLDSERIES2=1.1.1 1.1.0 1.0.2 1.0.1 1.0.0 0.9.x
44 ## Series for manual layouts, named similar to SERIES1, SERIES3, SERIES
45 MANSERIES1=1.1.1 1.0.2
46 MANSERIES3=3.3 3.2 3.1 3.0
47 MANSERIES=$(MANSERIES3) $(MANSERIES1)
49 ## Future series, i.e. a series that hasn't had any final release yet.
50 ## This would typically be a major or minor version that's still only
51 ## on the master branch, but that has come far enough for us to start
52 ## to make alpha and beta releases.
53 ## We distinguish them to avoid having to produce notes, vulnerability
54 ## documents, ... but still being able to present tarballs.
57 # All simple generated files.
59 # The H_ variables hold renderings of .md files present in the local
60 # repository. This does not include .md files taken from other repositories,
61 # they have their own special handling.
62 H_TOP = $(addsuffix .html,\
63 $(basename $(shell git ls-files -- *.md | grep -v '^README')) \
64 $(basename $(basename $(shell git ls-files -- *.md.tt))))
65 H_COMMUNITY = $(addsuffix .html,\
66 $(basename $(shell git ls-files -- community/*.md)) \
67 $(basename $(basename $(shell git ls-files -- community/*.md.tt))))
68 # We filter out any file starting with 'sub-'... they get special treatment
69 H_DOCS = $(addsuffix .html,\
70 $(basename $(shell git ls-files -- docs/*.md \
73 H_NEWS = $(addsuffix .html,\
74 $(basename $(shell git ls-files -- news/*.md)) \
75 $(basename $(basename $(shell git ls-files -- news/*.md.tt))))
76 H_POLICIES = $(addsuffix .html,\
77 $(basename $(shell git ls-files -- \
79 policies/general/*.md \
80 policies/technical/*.md \
81 policies/general-supplemental/*.md)) \
82 $(basename $(basename $(shell git ls-files -- \
83 policies/general/*.md.tt \
84 policies/technical/*.md.tt))))
85 # We filter out any file starting with 'sub-'... they get special treatment
86 H_SOURCE= $(addsuffix .html,\
87 $(basename $(shell git ls-files -- source/*.md \
90 $(basename $(shell git ls-files -- source/*.md.tt \
93 H_SUPPORT = $(addsuffix .html,$(basename $(shell git ls-files -- support/*.md)))
97 $(foreach S,$(SERIES),news/openssl-$(S)-notes.html) \
101 $(foreach S,$(SERIES) $(OLDSERIES),news/vulnerabilities-$(S).html) \
103 policies/glossary.html \
107 SRCLISTS = $(foreach S,$(FUTURESERIES) $(SERIES) $(OLDSERIES2) fips,source/old/$(S)/index.html)
109 SIMPLEDOCS = $(H_DOCS) \
110 docs/OpenSSLStrategicArchitecture.html \
111 docs/OpenSSL300Design.html \
114 GLOSSARY=$(CHECKOUTS)/general-policies/policies/glossary.md
115 all_GENERAL_POLICIES=$(wildcard $(CHECKOUTS)/general-policies/policies/*.md)
116 all_GENERAL_POLICY_SUPPL=$(wildcard $(CHECKOUTS)/general-policies/policy-supplemental/*.md)
117 all_TECHNICAL_POLICIES=$(wildcard $(CHECKOUTS)/technical-policies/policies/*.md)
118 GENERAL_POLICIES=$(filter-out $(CHECKOUTS)/general-policies/policies/README.md $(GLOSSARY),$(all_GENERAL_POLICIES))
119 GENERAL_POLICY_SUPPL=$(filter-out $(CHECKOUTS)/general-policies/policy-supplemental/README.md,$(all_GENERAL_POLICY_SUPPL))
120 TECHNICAL_POLICIES=$(filter-out $(CHECKOUTS)/technical-policies/policies/README.md,$(all_TECHNICAL_POLICIES))
124 %.html : %.md bin/md-to-html5
131 all: suball subdocs manmastertts mancross manhtml akamai-purge
133 suball: $(SIMPLE) $(SRCLISTS)
135 relupd: suball docs akamai-purge
137 docs: subdocs manpagetts mancross manhtml
139 subdocs: $(SIMPLEDOCS)
142 rm -rf $(SIMPLE) $(SIMPLEDOCS) $(SRCLISTS)
147 hack-source_htaccess: all
152 # For our use of pandoc for full documents, we create a template suitable
154 inc/pandoc-template.html5: inc/pandoc-header.html5 inc/pandoc-body-prologue.html5 inc/pandoc-body-epilogue.html5 bin/mk-pandoc-template Makefile
155 pandoc --print-default-template=html5 \
156 | ./bin/mk-pandoc-template html5 > $@
157 # Make bin/md-to-html5 depend on inc/pandoc-template.html5
158 bin/md-to-html5: inc/pandoc-template.html5
160 ######################################################################
162 ## Man-page building section
164 ## This is quite a complex set of rules, because there are many
165 ## things that need to be built:
167 ## - The man-pages themselves
168 ## - Apropos-like listings
169 ## - Cross-references between man-pages in different OpenSSL
172 ## A lot of the work is made with generated rules.
174 # makemanpagetts1 and makemanpagetts3 creates rules for targets like man-pagetts-1.1.1,
175 # to build the set of man-page templates. makemanpagetts1 is used for pre-3.0 OpenSSL,
176 # while makemanpagetts3 is used for OpenSSL 3.0 and on.
177 # makemanapropos creates rules for targets like man-apropos-1.1.1, to build
178 # 'apropos' like indexes for all the manpages.
179 # makemanindexes creates rules for targets like man-index-1.1.1, to build the
180 # main HTML index for a set of man-pages.
182 # $(1) = input directory in CHECKOUTS, $(2) = release version
184 # This variant is for pre-3.0 documentation
185 define makemanpagetts1
188 @mkdir -p docs/man$(2) \
193 ./bin/mk-manpagetts $(CHECKOUTS)/$(1)/doc $(2) docs/man$(2)
195 # This variant is for 3.0 documentation
196 define makemanpagetts3
199 @mkdir -p docs/man$(2) \
204 ./bin/mk-manpagetts3 $(CHECKOUTS)/$(1) $(2) docs/man$(2)
206 define makemanapropos
207 docs/man$(2)/man1/index.inc: bin/mk-apropos Makefile
208 ./bin/mk-apropos docs/man$(2)/man1 > $$@
209 docs/man$(2)/man3/index.inc: bin/mk-apropos Makefile
210 ./bin/mk-apropos docs/man$(2)/man3 > $$@
211 docs/man$(2)/man5/index.inc: bin/mk-apropos Makefile
212 ./bin/mk-apropos docs/man$(2)/man5 > $$@
213 docs/man$(2)/man7/index.inc: bin/mk-apropos Makefile
214 ./bin/mk-apropos docs/man$(2)/man7 > $$@
216 define makemanindexes
217 docs/man$(2)/man1/index.md: docs/sub-man1-index.md.tt \
218 docs/man$(2)/man1/index.inc \
220 ./bin/from-tt -d docs/man$(2)/man1 \
221 releases='$(MANSERIES)' release='$(2)' \
223 docs/man$(2)/man3/index.md: docs/sub-man3-index.md.tt \
224 docs/man$(2)/man3/index.inc \
226 ./bin/from-tt -d docs/man$(2)/man3 \
227 releases='$(MANSERIES)' release='$(2)' \
229 docs/man$(2)/man5/index.md: docs/sub-man5-index.md.tt \
230 docs/man$(2)/man5/index.inc \
232 ./bin/from-tt -d docs/man$(2)/man5 \
233 releases='$(MANSERIES)' release='$(2)' \
235 docs/man$(2)/man7/index.md: docs/sub-man7-index.md.tt \
236 docs/man$(2)/man7/index.inc \
238 ./bin/from-tt -d docs/man$(2)/man7 \
239 releases='$(MANSERIES)' release='$(2)' \
241 docs/man$(2)/index.md: docs/sub-index.md.tt bin/from-tt Makefile
242 ./bin/from-tt -d docs/man$(2) \
243 releases='$(MANSERIES)' release='$(2)' \
246 define makemandirdata
247 docs/man$(2)/man1/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
248 ./bin/from-tt -d docs/man$(2)/man1 \
249 releases='$(MANSERIES)' release='$(2)' sectnum=1 \
251 docs/man$(2)/man3/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
252 ./bin/from-tt -d docs/man$(2)/man3 \
253 releases='$(MANSERIES)' release='$(2)' sectnum=3 \
255 docs/man$(2)/man5/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
256 ./bin/from-tt -d docs/man$(2)/man5 \
257 releases='$(MANSERIES)' release='$(2)' sectnum=5 \
259 docs/man$(2)/man7/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
260 ./bin/from-tt -d docs/man$(2)/man7 \
261 releases='$(MANSERIES)' release='$(2)' sectnum=7 \
263 docs/man$(2)/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
264 ./bin/from-tt -d docs/man$(2) \
265 releases='$(MANSERIES)' release='$(2)' \
269 $(eval $(call makemanpagetts1,$(1),$(2)))
270 $(eval $(call makemanapropos,$(1),$(2)))
271 $(eval $(call makemanindexes,$(1),$(2)))
272 $(eval $(call makemandirdata,$(1),$(2)))
275 $(eval $(call makemanpagetts3,$(1),$(2)))
276 $(eval $(call makemanapropos,$(1),$(2)))
277 $(eval $(call makemanindexes,$(1),$(2)))
278 $(eval $(call makemandirdata,$(1),$(2)))
281 # Now that we have the generating macros in place, let's use them!
283 # Start off with creating the 'manpages-master' target, taking the
284 # source from $(CHECKOUTS)/openssl/doc
285 $(eval $(call makemanuals3,openssl,master))
287 # Next, create 'manpages-x.y' for all current releases from 3.0 and on,
288 # taking the source from $(CHECKOUTS)/openssl-x.y/doc
289 $(foreach S,$(MANSERIES3),$(eval $(call makemanuals3,openssl-$(S),$(S))))
291 # Next, create 'manpages-x.y.z' for all current pre-3.0 releases, taking the
292 # source from $(CHECKOUTS)/openssl-x.y.z-stable/doc
293 $(foreach S,$(MANSERIES1),$(eval $(call makemanuals1,openssl-$(S)-stable,$(S))))
296 $(foreach SEC,1 3 5 7, docs/manmaster/man$(SEC))
297 MANMASTERTT_TARGETS = \
299 docs/manmaster/dirdata.yaml docs/manmaster/index.html \
300 $(foreach D,$(MANMASTER_DIRS), $(D)/dirdata.yaml $(D)/index.html)
301 manmastertts: $(MANMASTERTT_TARGETS)
303 $(foreach S,$(MANSERIES), \
304 $(foreach SEC,1 3 5 7, docs/man$(S)/man$(SEC)))
305 MANPAGETT_TARGETS = \
306 $(foreach S,$(MANSERIES), man-pagetts-$(S) \
307 docs/man$(S)/dirdata.yaml docs/man$(S)/index.html) \
308 $(foreach D,$(MANPAGE_DIRS), $(D)/dirdata.yaml $(D)/index.html)
309 manpagetts: manmastertts $(MANPAGETT_TARGETS)
312 ./bin/mk-mancross master $(MANSERIES)
314 # We can't get all the files when make is started, but we can make the
315 # patterns for a for loop.
316 MANHTML_TTPATTERNS=$(foreach D,$(MANMASTER_DIRS) $(MANPAGE_DIRS), $(D)/*.md.tt)
318 ./bin/mk-manhtml '$(MANHTML_TTPATTERNS)'
320 docs/manpages.md: docs/manpages.md.tt Makefile bin/from-tt
322 ./bin/from-tt releases='master $(MANSERIES)' $<
324 docs/mansidebar.html: docs/mansidebar.html.tt Makefile bin/from-tt
326 ./bin/from-tt releases='master $(MANSERIES)' $<
328 ######################################################################
330 ## Policy page building section
333 .PHONY: technical-policies
334 technical-policies: $(TECHNICAL_POLICIES) policies/technical/dirdata.yaml \
336 mkdir -p policies/technical
337 for x in $(TECHNICAL_POLICIES); do \
339 f=$$(basename $$x .md); \
341 | sed -E -e 's!https?://github\.com/openssl/(general|technical)-policies/blob/master/policies/(.*)\.md!../\1/\2.html!' \
342 | sed -E -e 's!https?://github\.com/openssl/(general|technical)-policies/blob/master/policy-supplemental/(.*)\.md!../\1-supplemental/\2.html!' \
343 | sed -E -e 's!\.\./general/glossary\.html!../glossary.html!' \
344 | ./bin/md-to-html5 -o policies/technical/"$$f".html; \
346 policies/technical/index.inc: technical-policies bin/mk-md-titlelist Makefile
347 ./bin/mk-md-titlelist '' $(TECHNICAL_POLICIES) > $@
348 policies/technical/index.md: policies/technical/index.inc
349 policies/technical/dirdata.yaml: policies/technical/index.inc
350 policies/technical/index.html: policies/technical/index.md
352 .PHONY: general-policies
353 general-policies: $(GENERAL_POLICIES) policies/general/dirdata.yaml \
355 mkdir -p policies/general
356 for x in $(GENERAL_POLICIES); do \
357 d=$$(dirname "$$x"); \
358 f=$$(basename "$$x" .md); \
360 | sed -E -e 's!https?://github\.com/openssl/(general|technical)-policies/blob/master/policies/(.*)\.md!../\1/\2.html!' \
361 | sed -E -e 's!https?://github\.com/openssl/(general|technical)-policies/blob/master/policy-supplemental/(.*)\.md!../\1-supplemental/\2.html!' \
362 | sed -E -e 's!\.\./policy-supplemental/(.*)\.html!../general-supplemental/\1.html!' \
363 | sed -E -e 's!\.\./general/glossary\.html!../glossary.html!' \
364 | ./bin/md-to-html5 -o policies/general/"$$f".html; \
366 policies/general/index.inc: general-policies general-policy-supplemental bin/mk-md-titlelist Makefile
367 ./bin/mk-md-titlelist '' $(GENERAL_POLICIES) > $@
368 policies/general/index.md: policies/general/index.inc
369 policies/general/dirdata.yaml: policies/general/index.inc
370 policies/general/index.html: policies/general/index.md
372 .PHONY: general-policy-supplemental
373 general-policy-supplemental: $(GENERAL_POLICY_SUPPL) bin/md-to-html5
374 mkdir -p policies/general-supplemental
375 for x in $(GENERAL_POLICY_SUPPL); do \
376 d=$$(dirname "$$x"); \
377 f=$$(basename "$$x" .md); \
379 | ./bin/md-to-html5 -o policies/general-supplemental/"$$f".html; \
382 policies/glossary.html: $(GLOSSARY) bin/md-to-html5 policies/dirdata.yaml
384 | sed -E -e 's!https?://github\.com/openssl/(general|technical)-policies/blob/master/policies/(.*)\.md!\1/\2.html!' \
385 | sed -E -e 's!general/glossary\.html!glossary.html!' \
386 | ./bin/md-to-html5 -o policies/glossary.html
388 ######################################################################
390 ## $(SIMPLE) -- SIMPLE GENERATED FILES
393 newsflash.inc: news/newsflash.inc
396 index.md: newsflash.inc inc/legalities.md
398 community/committers.inc: $(PERSONDB) bin/mk-committers Makefile
400 wget -q https://api.openssl.org/0/Group/commit/Members
401 ./bin/mk-committers <Members >$@
403 community/committers.md: community/committers.inc
405 community/otc.inc: $(PERSONDB) bin/mk-omc Makefile
406 ./bin/mk-omc -n -p -t 'OTC Members' otc otc-inactive > $@
407 community/otc.md: community/otc.inc
408 community/omc.inc: $(PERSONDB) bin/mk-omc Makefile
409 ./bin/mk-omc -n -e -l -p -t 'OMC Members' omc omc-inactive > $@
410 community/omc.md: community/omc.inc
411 community/omc-alumni.inc: $(PERSONDB) bin/mk-omc Makefile
412 ./bin/mk-omc -n -l -t 'OMC Alumni' omc-alumni omc-emeritus > $@
413 community/omc-alumni.md: community/omc-alumni.inc
415 news/changelog.inc: news/changelog.txt bin/post-process-html5 Makefile
417 (echo 'Table of contents'; sed -e '1,/^OpenSSL Releases$$/d' < $<) \
418 | pandoc -t html5 -f commonmark | ./bin/post-process-html5 >$@
419 news/changelog.md: news/changelog.md.tt news/changelog.inc \
422 ./bin/from-tt 'releases=$(SERIES)' $<
423 # Additionally, make news/changelog.html depend on clxy[z].txt, where xy[z]
424 # comes from the release number x.y[.z]. This permits it to be automatically
425 # recreated whenever there's a new major release.
426 news/changelog.html: $(foreach S,$(SERIES),news/cl$(subst .,,$(S)).txt)
428 # mknews_changelogtxt creates a target and ruleset for any changelog text
429 # file depending on the CHANGES file from the target release.
431 # $(1) = output file, $(2) = CHANGES files, relative to CHECKOUTS
432 define mknews_changelogtxt
433 news/$(1): $(CHECKOUTS)/$(2)
438 # Create the target 'news/changelog.txt', taking the source from
439 # $(CHECKOUTS)/openssl/CHANGES.md
440 # We use the .txt extension for multiple purposes:
441 # 1. So the web server maps to the MIME type text/plain
442 # 2. To ensure there's no need to publish any .md file (since they're all
443 # supposed to be used to generate .html files)
444 # 3. Because it was changelog.txt before, a well known target. Why change it?
445 $(eval $(call mknews_changelogtxt,changelog.txt,openssl/CHANGES.md))
447 # Create the target 'news/clxy.md' for all releases from 3.0 and on, taking
448 # the source from $(CHECKOUTS)/openssl-x.y/CHANGES.md
449 $(foreach S,$(SERIES3),\
450 $(eval $(call mknews_changelogtxt,cl$(subst .,,$(S)).txt,openssl-$(S)/CHANGES.md)))
452 # Create the targets 'news/clxyz.txt' for all current pre-3.0 releases,
453 # taking the source from $(CHECKOUTS)/openssl-x.y.z-stable/CHANGES
454 $(foreach S,$(SERIES1),\
455 $(eval $(call mknews_changelogtxt,cl$(subst .,,$(S)).txt,openssl-$(S)-stable/CHANGES)))
457 # mknews_noteshtml creates two targets and rulesets for creating notes from
458 # the NEWS file for each release. One target is to create a wrapping HTML
459 # file from a template, the other is to create the inclusion file with the
462 # $(1) = release version, $(2) = NEWS file, relative to CHECKOUTS
463 define mknews_noteshtml
464 news/openssl-$(1)-notes.md: news/openssl-notes.md.tt \
465 news/openssl-$(1)-notes.inc \
468 ./bin/from-tt -d news -i $$< -o $$@ release='$(1)'
469 news/openssl-$(1)-notes.inc: $(CHECKOUTS)/$(2) bin/mk-notes Makefile
471 ./bin/mk-notes $(1) < $(CHECKOUTS)/$(2) > $$@
474 # Create the targets 'news/openssl-x.y-notes.html' and
475 # 'news/openssl-x.y-notes.inc' for each release number x.y starting with 3.0,
476 # taking the source from the news file given as second argument.
477 $(foreach S,$(SERIES3),\
478 $(eval $(call mknews_noteshtml,$(S),openssl-$(S)/NEWS.md)))
480 # Create the targets 'news/openssl-x.y.z-notes.html' and
481 # 'news/openssl-x.y.z-notes.inc' for each pre-3.0 release number x.y.z,
482 # taking the source from the news file given as second argument.
483 $(foreach S,$(SERIES1),\
484 $(eval $(call mknews_noteshtml,$(S),openssl-$(S)-stable/NEWS)))
486 news/newsflash.inc: $(OMCDATA)/newsflash.txt Makefile
489 -e 's@^@<tr><td class="d">@' \
490 -e 's@: @</td><td class="t">@' \
491 -e 's@$$@</td></tr>@'
493 # mknews_vulnerability creates two targets and rulesets for creating
494 # vulnerability lists for each release. One target is to create a wrapping
495 # HTML file from a template, the other is to create the inclusion file with
498 # $(1) = output file mod, $(2) = release version switch, $(3) = release version
499 define mknews_vulnerability
500 news/vulnerabilities$(1).inc: bin/cvejsontohtml.py news/secjson Makefile
502 python3 ./bin/cvejsontohtml.py -i news/secjson/ $(2) > $$@
503 news/vulnerabilities$(1).md: news/vulnerabilities.md.tt \
504 news/vulnerabilities$(1).inc \
507 ./bin/from-tt -d news vulnerabilitiesinc='vulnerabilities$(1).inc' < $$< > $$@
510 # Create the main vulnerability index 'news/vulnerabilities.html' and
511 # 'news/vulnerabilities.inc'
512 $(eval $(call mknews_vulnerability,,))
514 # Create the vulnerability index 'news/vulnerabilities-x.y[.z].html' and
515 # 'news/vulnerabilities-x.y[.z].inc' for each release x.y[.z]
516 $(foreach S,$(SERIES) $(OLDSERIES),\
517 $(eval $(call mknews_vulnerability,-$(S),-b $(S))))
519 source/.htaccess: $(wildcard source/openssl-*.tar.gz) bin/mk-latest Makefile
521 ./bin/mk-latest $(RELEASEDIR) >$@
522 source/index.inc: $(wildcard $(RELEASEDIR)/openssl-*.tar.gz) bin/mk-filelist Makefile
524 ./bin/mk-filelist $(RELEASEDIR) '' 'openssl-*.tar.gz' >$@
526 # mknews_secadv creates a target to copy a secadv file from $(OMCDATA)/secadv
530 news/secadv/$(1): $(OMCDATA)/secadv/$(1)
534 # mknews_secjson creates a target to copy a security json file from $(OMCDATA)/vulnerabilities-json
537 define mknews_secjson
538 news/secjson/$(1): $(OMCDATA)/vulnerabilities-json/$(1)
542 # Get the set of files in $(OMCDATA)/secadv/
543 SECADV_FILES = $(shell cd $(OMCDATA)/secadv/; git ls-files)
544 $(foreach F,$(SECADV_FILES),$(eval $(call mknews_secadv,$(F))))
546 # Get the set of files in $(OMCDATA)/vulnerabilities-json/
547 SECJSON_FILES = $(shell cd $(OMCDATA)/vulnerabilities-json/; git ls-files)
548 $(foreach F,$(SECJSON_FILES),$(eval $(call mknews_secjson,$(F))))
550 mkdirnews_secadv: FORCE
552 news/secadv: mkdirnews_secadv $(addprefix news/secadv/,$(SECADV_FILES))
553 .PHONY: news/secadv mkdirnews_secadv
555 mkdirnews_secjson: FORCE
556 mkdir -p news/secjson
557 news/secjson: mkdirnews_secjson $(addprefix news/secjson/,$(SECJSON_FILES))
558 .PHONY: news/secjson mkdirnews_secjson
560 ######################################################################
562 ## $(SRCLISTS) -- LISTS OF SOURCES
565 # mkoldsourceindex creates two targets and rulesets for creating the
566 # list of update tarballs for each release. One target is to create a
567 # wrapping HTML file from a template, the other is to create the
568 # inclusion file with the actual text.
570 # $(1) = release, $(2) = release title
571 define mkoldsourceindex
572 source/old/$(1)/index.inc: $(RELEASEDIR)/old/$(1) bin/mk-filelist Makefile
573 @mkdir -p `dirname $$@`
575 ./bin/mk-filelist $(RELEASEDIR)/old/$(1) '' '*.gz' > $$@
576 source/old/$(1)/index.md: source/old/sub-index.md.tt inc/legalities.md \
577 source/old/$(1)/index.inc \
579 @mkdir -p `dirname $$@`
581 ./bin/from-tt -d source/old/$(1) \
582 release='$(1)' releasetitle='Old $(2) Releases' \
585 define mkoldsourcedirdata
586 source/old/$(1)/dirdata.yaml: source/old/sub-dirdata.yaml.tt bin/from-tt Makefile
587 @mkdir -p `dirname $$@`
589 ./bin/from-tt -d source/old/$(1) \
590 release='$(1)' releasetitle='Old $(2) Releases' \
592 source/old/$(1)/index.html: source/old/$(1)/dirdata.yaml
595 # Create the update tarball index 'source/old/x.y.z/index.html' and
596 # 'source/old/x.y.z/index.inc' for each release x.y.z.
597 # We also create a list specifically for the old FIPS module, carefully
598 # crafting an HTML title with an uppercase 'FIPS' while the subdirectory
599 # remains named 'fips'
600 $(foreach S,fips $(FUTURESERIES) $(SERIES) $(OLDSERIES2),$(eval $(call mkoldsourceindex,$(S),$(patsubst fips,FIPS,$(S)))))
601 $(foreach S,fips $(FUTURESERIES) $(SERIES) $(OLDSERIES2),$(eval $(call mkoldsourcedirdata,$(S),$(patsubst fips,FIPS,$(S)))))
603 source/old/index.md: source/old/index.md.tt inc/legalities.md \
604 Makefile bin/from-tt Makefile
605 @mkdir -p `dirname $@`
607 ./bin/from-tt releases='$(FUTURESERIES) $(SERIES) $(OLDSERIES2) fips' $<
609 # Extra inc -> markdown dependencies
611 news/newslog.md: news/newsflash.inc
612 news/pgpkey.md: news/openssl-security.asc
613 source/index.md: source/index.inc
615 # Extra HTML dependencies (apart from the markdown file it comes from)
617 # makehtmldepend creates a standard dependency for HTML files rendered from
620 define makehtmldepend
621 $(1): bin/md-to-html5 $(dir $(1))dirdata.yaml
624 # Generate standard dependencies for our known HTML outputs.
629 $(filter %.html,$(MANMASTER_TARGETS)) \
630 $(filter %.html,$(MANPAGES_TARGETS)) \
635 ,$(eval $(call makehtmldepend,$(H))))