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
40 SERIES=$(SERIES3) $(SERIES1)
41 ## Older series. The second type is for source listings
42 OLDSERIES=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.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
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,$(basename $(shell git ls-files -- *.md)))
63 H_COMMUNITY = $(addsuffix .html,\
64 $(basename $(shell git ls-files -- community/*.md)) \
65 $(basename $(basename $(shell git ls-files -- community/*.md.tt))))
66 # We filter out any file starting with 'sub-'... they get special treatment
67 H_DOCS = $(addsuffix .html,\
68 $(basename $(shell git ls-files -- docs/*.md \
71 H_NEWS = $(addsuffix .html,$(basename $(shell git ls-files -- news/*.md)))
72 H_POLICIES = $(addsuffix .html,\
73 $(basename $(shell git ls-files -- \
75 policies/general/*.md \
76 policies/technical/*.md \
77 policies/general-supplemental/*.md)))
78 # We filter out any file starting with 'sub-'... they get special treatment
79 H_SOURCE= $(addsuffix .html,\
80 $(basename $(shell git ls-files -- source/*.md \
83 $(basename $(shell git ls-files -- source/*.md.tt \
86 H_SUPPORT = $(addsuffix .html,$(basename $(shell git ls-files -- support/*.md)))
92 $(foreach S,$(SERIES),news/openssl-$(S)-notes.inc) \
93 $(foreach S,$(SERIES),news/openssl-$(S)-notes.html) \
98 news/vulnerabilities.inc \
99 news/vulnerabilities.html \
100 $(foreach S,$(SERIES) $(OLDSERIES),news/vulnerabilities-$(S).inc) \
101 $(foreach S,$(SERIES) $(OLDSERIES),news/vulnerabilities-$(S).html) \
103 policies/glossary.html \
108 SRCLISTS = $(foreach S,$(FUTURESERIES) $(SERIES) $(OLDSERIES2) fips,source/old/$(S)/index.inc source/old/$(S)/index.html)
110 SIMPLEDOCS = $(H_DOCS) \
112 docs/OpenSSLStrategicArchitecture.html \
113 docs/OpenSSL300Design.html \
116 GLOSSARY=$(CHECKOUTS)/general-policies/policies/glossary.md
117 all_GENERAL_POLICIES=$(wildcard $(CHECKOUTS)/general-policies/policies/*.md)
118 all_GENERAL_POLICY_SUPPL=$(wildcard $(CHECKOUTS)/general-policies/policy-supplemental/*.md)
119 all_TECHNICAL_POLICIES=$(wildcard $(CHECKOUTS)/technical-policies/policies/*.md)
120 GENERAL_POLICIES=$(filter-out $(CHECKOUTS)/general-policies/policies/README.md $(GLOSSARY),$(all_GENERAL_POLICIES))
121 GENERAL_POLICY_SUPPL=$(filter-out $(CHECKOUTS)/general-policies/policy-supplemental/README.md,$(all_GENERAL_POLICY_SUPPL))
122 TECHNICAL_POLICIES=$(filter-out $(CHECKOUTS)/technical-policies/policies/README.md,$(all_TECHNICAL_POLICIES))
126 %.html : %.md bin/md-to-html5
133 all: suball subdocs manmaster mancross sitemap akamai-purge
135 suball: $(SIMPLE) $(SRCLISTS)
137 relupd: suball docs sitemap akamai-purge
139 docs: subdocs manpages mancross
141 subdocs: $(SIMPLEDOCS)
144 rm -f $(SIMPLE) $(SIMPLEDOCS) $(SRCLISTS)
149 hack-source_htaccess: all
154 # For our use of pandoc for full documents, we create a template suitable
156 inc/pandoc-template.html5: inc/pandoc-header.html5 inc/pandoc-body-prologue.html5 inc/pandoc-body-epilogue.html5 bin/mk-pandoc-template Makefile
157 pandoc --print-default-template=html5 \
158 | ./bin/mk-pandoc-template html5 > $@
159 # Make bin/md-to-html5 depend on inc/pandoc-template.html5
160 bin/md-to-html5: inc/pandoc-template.html5
162 ######################################################################
164 ## Man-page building section
166 ## This is quite a complex set of rules, because there are many
167 ## things that need to be built:
169 ## - The man-pages themselves
170 ## - Apropos-like listings
171 ## - Cross-references between man-pages in different OpenSSL
174 ## A lot of the work is made with generated rules.
176 # makemanpages1 and makemanpages3 creates rules for targets like man-pages-1.1.1,
177 # to build the set of man-pages. makemanpages1 is used for pre-3.0 OpenSSL,
178 # while makemanpages3 is used for OpenSSL 3.0 and on.
179 # makemanapropos creates rules for targets like man-apropos-1.1.1, to build
180 # 'apropos' like indexes for all the manpages.
181 # makemanindexes creates rules for targets like man-index-1.1.1, to build the
182 # main HTML index for a set of man-pages.
184 # $(1) = input directory in CHECKOUTS, $(2) = release version
186 # This variant is for pre-3.0 documentation
190 @mkdir -p docs/man$(2) \
195 ./bin/mk-manpages $(CHECKOUTS)/$(1)/doc $(2) docs/man$(2)
197 # This variant is for 3.0 documentation
201 @mkdir -p docs/man$(2) \
206 ./bin/mk-manpages3 $(CHECKOUTS)/$(1) $(2) docs/man$(2)
208 define makemanapropos
209 docs/man$(2)/man1/index.inc: bin/mk-apropos Makefile
210 ./bin/mk-apropos docs/man$(2)/man1 > $$@
211 docs/man$(2)/man3/index.inc: bin/mk-apropos Makefile
212 ./bin/mk-apropos docs/man$(2)/man3 > $$@
213 docs/man$(2)/man5/index.inc: bin/mk-apropos Makefile
214 ./bin/mk-apropos docs/man$(2)/man5 > $$@
215 docs/man$(2)/man7/index.inc: bin/mk-apropos Makefile
216 ./bin/mk-apropos docs/man$(2)/man7 > $$@
218 define makemanindexes
219 docs/man$(2)/man1/index.md: docs/sub-man1-index.md.tt bin/from-tt Makefile
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 bin/from-tt Makefile
224 ./bin/from-tt -d docs/man$(2)/man3 \
225 releases='$(MANSERIES)' release='$(2)' \
227 docs/man$(2)/man5/index.md: docs/sub-man5-index.md.tt bin/from-tt Makefile
228 ./bin/from-tt -d docs/man$(2)/man5 \
229 releases='$(MANSERIES)' release='$(2)' \
231 docs/man$(2)/man7/index.md: docs/sub-man7-index.md.tt bin/from-tt Makefile
232 ./bin/from-tt -d docs/man$(2)/man7 \
233 releases='$(MANSERIES)' release='$(2)' \
235 docs/man$(2)/index.md: docs/sub-index.md.tt bin/from-tt Makefile
236 ./bin/from-tt -d docs/man$(2) \
237 releases='$(MANSERIES)' release='$(2)' \
240 define makemandirdata
241 docs/man$(2)/man1/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
242 ./bin/from-tt -d docs/man$(2)/man1 \
243 releases='$(MANSERIES)' release='$(2)' \
245 docs/man$(2)/man3/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
246 ./bin/from-tt -d docs/man$(2)/man3 \
247 releases='$(MANSERIES)' release='$(2)' \
249 docs/man$(2)/man5/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
250 ./bin/from-tt -d docs/man$(2)/man5 \
251 releases='$(MANSERIES)' release='$(2)' \
253 docs/man$(2)/man7/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
254 ./bin/from-tt -d docs/man$(2)/man7 \
255 releases='$(MANSERIES)' release='$(2)' \
257 docs/man$(2)/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
258 ./bin/from-tt -d docs/man$(2) \
259 releases='$(MANSERIES)' release='$(2)' \
263 $(eval $(call makemanpages1,$(1),$(2)))
264 $(eval $(call makemanapropos,$(1),$(2)))
265 $(eval $(call makemanindexes,$(1),$(2)))
266 $(eval $(call makemandirdata,$(1),$(2)))
269 $(eval $(call makemanpages3,$(1),$(2)))
270 $(eval $(call makemanapropos,$(1),$(2)))
271 $(eval $(call makemanindexes,$(1),$(2)))
272 $(eval $(call makemandirdata,$(1),$(2)))
275 # Now that we have the generating macros in place, let's use them!
277 # Start off with creating the 'manpages-master' target, taking the
278 # source from $(CHECKOUTS)/openssl/doc
279 $(eval $(call makemanuals3,openssl,master))
281 # Next, create 'manpages-x.y' for all current releases from 3.0 and on,
282 # taking the source from $(CHECKOUTS)/openssl-x.y/doc
283 $(foreach S,$(MANSERIES3),$(eval $(call makemanuals3,openssl-$(S),$(S))))
285 # Next, create 'manpages-x.y.z' for all current pre-3.0 releases, taking the
286 # source from $(CHECKOUTS)/openssl-x.y.z-stable/doc
287 $(foreach S,$(MANSERIES1),$(eval $(call makemanuals1,openssl-$(S)-stable,$(S))))
289 MANMASTER_TARGETS = \
290 man-pages-master docs/manmaster/index.html \
291 $(foreach SEC,1 3 5 7, docs/manmaster/man$(SEC)/index.inc \
292 docs/manmaster/man$(SEC)/index.html)
293 manmaster: $(MANMASTER_TARGETS)
295 $(foreach S,$(MANSERIES), \
296 man-pages-$(S) docs/man$(S)/index.html \
297 $(foreach SEC,1 3 5 7, docs/man$(S)/man$(SEC)/index.inc \
298 docs/man$(S)/man$(SEC)/index.html))
299 manpages: manmaster $(MANPAGES_TARGETS)
302 ./bin/mk-mancross master $(MANSERIES)
304 docs/manpages.md: docs/manpages.md.tt Makefile bin/from-tt
306 ./bin/from-tt releases='master $(MANSERIES)' $<
308 docs/mansidebar.html: docs/mansidebar.html.tt Makefile bin/from-tt
310 ./bin/from-tt releases='master $(MANSERIES)' $<
312 docs/faq.inc: $(wildcard docs/faq-[0-9]-*.txt) Makefile bin/mk-faq
314 ./bin/mk-faq docs/faq-[0-9]-*txt >$@
316 ######################################################################
318 ## Policy page building section
321 .PHONY: technical-policies
322 technical-policies: $(TECHNICAL_POLICIES) bin/md-to-html5
323 mkdir -p policies/technical
324 for x in $(TECHNICAL_POLICIES); do \
326 f=$$(basename $$x .md); \
328 | sed -E -e 's!https?://github\.com/openssl/(general|technical)-policies/blob/master/policies/(.*)\.md!../\1/\2.html!' \
329 | sed -E -e 's!https?://github\.com/openssl/(general|technical)-policies/blob/master/policy-supplemental/(.*)\.md!../\1-supplemental/\2.html!' \
330 | sed -E -e 's!\.\./general/glossary\.html!../glossary.html!' \
331 | ./bin/md-to-html5 -o policies/technical/"$$f".html; \
333 policies/technical/index.inc: technical-policies bin/mk-md-titlelist Makefile
334 ./bin/mk-md-titlelist '' $(TECHNICAL_POLICIES) > $@
335 policies/technical/index.html: \
336 policies/technical/index.md policies/technical/index.inc \
337 policies/technical/dirdata.yaml
339 .PHONY: general-policies
340 general-policies: $(GENERAL_POLICIES) bin/md-to-html5
341 mkdir -p policies/general
342 for x in $(GENERAL_POLICIES); do \
343 d=$$(dirname "$$x"); \
344 f=$$(basename "$$x" .md); \
346 | sed -E -e 's!https?://github\.com/openssl/(general|technical)-policies/blob/master/policies/(.*)\.md!../\1/\2.html!' \
347 | sed -E -e 's!https?://github\.com/openssl/(general|technical)-policies/blob/master/policy-supplemental/(.*)\.md!../\1-supplemental/\2.html!' \
348 | sed -E -e 's!\.\./policy-supplemental/(.*)\.html!../general-supplemental/\1.html!' \
349 | sed -E -e 's!\.\./general/glossary\.html!../glossary.html!' \
350 | ./bin/md-to-html5 -o policies/general/"$$f".html; \
352 policies/general/index.inc: general-policies general-policy-supplemental bin/mk-md-titlelist Makefile
353 ./bin/mk-md-titlelist '' $(GENERAL_POLICIES) > $@
354 policies/general/index.html: \
355 policies/general/index.md policies/general/index.inc \
356 policies/general/dirdata.yaml
358 .PHONY: general-policy-supplemental
359 general-policy-supplemental: $(GENERAL_POLICY_SUPPL) bin/md-to-html5
360 mkdir -p policies/general-supplemental
361 for x in $(GENERAL_POLICY_SUPPL); do \
362 d=$$(dirname "$$x"); \
363 f=$$(basename "$$x" .md); \
365 | ./bin/md-to-html5 -o policies/general-supplemental/"$$f".html; \
368 policies/glossary.html: $(GLOSSARY) bin/md-to-html5 policies/dirdata.yaml
370 | sed -E -e 's!https?://github\.com/openssl/(general|technical)-policies/blob/master/policies/(.*)\.md!\1/\2.html!' \
371 | sed -E -e 's!general/glossary\.html!glossary.html!' \
372 | ./bin/md-to-html5 -o policies/glossary.html
374 ######################################################################
376 ## $(SIMPLE) -- SIMPLE GENERATED FILES
379 newsflash.inc: news/newsflash.inc
382 sitemap sitemap.txt: bin/mk-sitemap Makefile
384 ./bin/mk-sitemap master $(SERIES) > sitemap.txt
386 community/committers.inc: $(PERSONDB) bin/mk-committers Makefile
388 wget -q https://api.openssl.org/0/Group/commit/Members
389 ./bin/mk-committers <Members >$@
391 community/committers.md: community/committers.inc
393 community/otc.inc: $(PERSONDB) bin/mk-omc Makefile
394 ./bin/mk-omc -n -p -t 'OTC Members' otc otc-inactive > $@
395 community/omc.inc: $(PERSONDB) bin/mk-omc Makefile
396 ./bin/mk-omc -n -e -l -p -t 'OMC Members' omc omc-inactive > $@
397 community/omc.md: community/omc.inc
398 community/omc-alumni.inc: $(PERSONDB) bin/mk-omc Makefile
399 ./bin/mk-omc -n -l -t 'OMC Alumni' omc-alumni omc-emeritus > $@
400 community/omc-alumni.md: community/omc-alumni.inc
402 news/changelog.inc: news/changelog.txt bin/post-process-html5 Makefile
404 (echo 'Table of contents'; sed -e '1,/^OpenSSL Releases$$/d' < $<) \
405 | pandoc -t html5 -f commonmark | ./bin/post-process-html5 >$@
406 news/changelog.md: news/changelog.md.tt news/changelog.inc Makefile bin/from-tt
408 ./bin/from-tt 'releases=$(SERIES)' $<
409 # Additionally, make news/changelog.html depend on clxy[z].txt, where xy[z]
410 # comes from the release number x.y[.z]. This permits it to be automatically
411 # recreated whenever there's a new major release.
412 news/changelog.html: $(foreach S,$(SERIES),news/cl$(subst .,,$(S)).txt)
414 # mknews_changelogtxt creates a target and ruleset for any changelog text
415 # file depending on the CHANGES file from the target release.
417 # $(1) = output file, $(2) = CHANGES files, relative to CHECKOUTS
418 define mknews_changelogtxt
419 news/$(1): $(CHECKOUTS)/$(2)
424 # Create the target 'news/changelog.txt', taking the source from
425 # $(CHECKOUTS)/openssl/CHANGES.md
426 # We use the .txt extension for multiple purposes:
427 # 1. So the web server maps to the MIME type text/plain
428 # 2. To ensure there's no need to publish any .md file (since they're all
429 # supposed to be used to generate .html files)
430 # 3. Because it was changelog.txt before, a well known target. Why change it?
431 $(eval $(call mknews_changelogtxt,changelog.txt,openssl/CHANGES.md))
433 # Create the target 'news/clxy.md' for all releases from 3.0 and on, taking
434 # the source from $(CHECKOUTS)/openssl-x.y/CHANGES.md
435 $(foreach S,$(SERIES3),\
436 $(eval $(call mknews_changelogtxt,cl$(subst .,,$(S)).txt,openssl-$(S)/CHANGES.md)))
438 # Create the targets 'news/clxyz.txt' for all current pre-3.0 releases,
439 # taking the source from $(CHECKOUTS)/openssl-x.y.z-stable/CHANGES
440 $(foreach S,$(SERIES1),\
441 $(eval $(call mknews_changelogtxt,cl$(subst .,,$(S)).txt,openssl-$(S)-stable/CHANGES)))
443 # mknews_noteshtml creates two targets and rulesets for creating notes from
444 # the NEWS file for each release. One target is to create a wrapping HTML
445 # file from a template, the other is to create the inclusion file with the
448 # $(1) = release version, $(2) = NEWS file, relative to CHECKOUTS
449 define mknews_noteshtml
450 news/openssl-$(1)-notes.md: news/openssl-notes.md.tt bin/from-tt Makefile
452 ./bin/from-tt -d news -i $$< -o $$@ release='$(1)'
453 news/openssl-$(1)-notes.inc: $(CHECKOUTS)/$(2) bin/mk-notes Makefile
455 ./bin/mk-notes $(1) < $(CHECKOUTS)/$(2) > $$@
458 # Create the targets 'news/openssl-x.y-notes.html' and
459 # 'news/openssl-x.y-notes.inc' for each release number x.y starting with 3.0,
460 # taking the source from the news file given as second argument.
461 $(foreach S,$(SERIES3),\
462 $(eval $(call mknews_noteshtml,$(S),openssl-$(S)/NEWS.md)))
464 # Create the targets 'news/openssl-x.y.z-notes.html' and
465 # 'news/openssl-x.y.z-notes.inc' for each pre-3.0 release number x.y.z,
466 # taking the source from the news file given as second argument.
467 $(foreach S,$(SERIES1),\
468 $(eval $(call mknews_noteshtml,$(S),openssl-$(S)-stable/NEWS)))
470 news/newsflash.inc: $(OMCDATA)/newsflash.txt Makefile
473 -e 's@^@<tr><td class="d">@' \
474 -e 's@: @</td><td class="t">@' \
475 -e 's@$$@</td></tr>@'
477 # mknews_vulnerability creates two targets and rulesets for creating
478 # vulnerability lists for each release. One target is to create a wrapping
479 # HTML file from a template, the other is to create the inclusion file with
482 # $(1) = output file mod, $(2) = release version switch, $(3) = release version
483 define mknews_vulnerability
484 news/vulnerabilities$(1).inc: bin/cvejsontohtml.py news/secjson Makefile
486 python3 ./bin/cvejsontohtml.py -i news/secjson/ $(2) > $$@
487 news/vulnerabilities$(1).md: news/vulnerabilities.md.tt bin/from-tt Makefile
489 ./bin/from-tt -d news vulnerabilitiesinc='vulnerabilities$(1).inc' < $$< > $$@
492 # Create the main vulnerability index 'news/vulnerabilities.html' and
493 # 'news/vulnerabilities.inc'
494 $(eval $(call mknews_vulnerability,,))
496 # Create the vulnerability index 'news/vulnerabilities-x.y[.z].html' and
497 # 'news/vulnerabilities-x.y[.z].inc' for each release x.y[.z]
498 $(foreach S,$(SERIES) $(OLDSERIES),\
499 $(eval $(call mknews_vulnerability,-$(S),-b $(S))))
501 source/.htaccess: $(wildcard source/openssl-*.tar.gz) bin/mk-latest Makefile
503 ./bin/mk-latest $(RELEASEDIR) >$@
504 source/index.inc: $(wildcard $(RELEASEDIR)/openssl-*.tar.gz) bin/mk-filelist Makefile
506 ./bin/mk-filelist $(RELEASEDIR) '' 'openssl-*.tar.gz' >$@
508 # mknews_secadv creates a target to copy a secadv file from $(OMCDATA)/secadv
512 news/secadv/$(1): $(OMCDATA)/secadv/$(1)
516 # mknews_secjson creates a target to copy a security json file from $(OMCDATA)/vulnerabilities-json
519 define mknews_secjson
520 news/secjson/$(1): $(OMCDATA)/vulnerabilities-json/$(1)
524 # Get the set of files in $(OMCDATA)/secadv/
525 SECADV_FILES = $(shell cd $(OMCDATA)/secadv/; git ls-files)
526 $(foreach F,$(SECADV_FILES),$(eval $(call mknews_secadv,$(F))))
528 # Get the set of files in $(OMCDATA)/vulnerabilities-json/
529 SECJSON_FILES = $(shell cd $(OMCDATA)/vulnerabilities-json/; git ls-files)
530 $(foreach F,$(SECJSON_FILES),$(eval $(call mknews_secjson,$(F))))
532 mkdirnews_secadv: FORCE
534 news/secadv: mkdirnews_secadv $(addprefix news/secadv/,$(SECADV_FILES))
535 .PHONY: news/secadv mkdirnews_secadv
537 mkdirnews_secjson: FORCE
538 mkdir -p news/secjson
539 news/secjson: mkdirnews_secjson $(addprefix news/secjson/,$(SECJSON_FILES))
540 .PHONY: news/secjson mkdirnews_secjson
542 ######################################################################
544 ## $(SRCLISTS) -- LISTS OF SOURCES
547 # mkoldsourceindex creates two targets and rulesets for creating the
548 # list of update tarballs for each release. One target is to create a
549 # wrapping HTML file from a template, the other is to create the
550 # inclusion file with the actual text.
552 # $(1) = release, $(2) = release title
553 define mkoldsourceindex
554 source/old/$(1)/index.inc: $(RELEASEDIR)/old/$(1) bin/mk-filelist Makefile
555 @mkdir -p `dirname $$@`
557 ./bin/mk-filelist $(RELEASEDIR)/old/$(1) '' '*.gz' > $$@
558 source/old/$(1)/index.md: source/old/sub-index.md.tt bin/from-tt Makefile
559 @mkdir -p `dirname $$@`
561 ./bin/from-tt -d source/old/$(1) \
562 release='$(1)' releasetitle='Old $(2) Releases' \
565 define mkoldsourcedirdata
566 source/old/$(1)/dirdata.yaml: source/old/sub-dirdata.yaml.tt bin/from-tt Makefile
567 @mkdir -p `dirname $$@`
569 ./bin/from-tt -d source/old/$(1) \
570 release='$(1)' releasetitle='Old $(2) Releases' \
572 source/old/$(1)/index.html: source/old/$(1)/dirdata.yaml
575 # Create the update tarball index 'source/old/x.y.z/index.html' and
576 # 'source/old/x.y.z/index.inc' for each release x.y.z.
577 # We also create a list specifically for the old FIPS module, carefully
578 # crafting an HTML title with an uppercase 'FIPS' while the subdirectory
579 # remains named 'fips'
580 $(foreach S,fips $(SERIES) $(OLDSERIES2),$(eval $(call mkoldsourceindex,$(S),$(patsubst fips,FIPS,$(S)))))
581 $(foreach S,fips $(SERIES) $(OLDSERIES2),$(eval $(call mkoldsourcedirdata,$(S),$(patsubst fips,FIPS,$(S)))))
583 source/old/index.md: source/old/index.md.tt Makefile bin/from-tt Makefile
584 @mkdir -p `dirname $@`
586 ./bin/from-tt releases='$(SERIES) $(OLDSERIES2) fips' $<
588 # Extra inc -> markdown dependencies
591 # Extra HTML dependencies (apart from the markdown file it comes from)
593 # makehtmldepend creates a standard dependency for HTML files rendered from
596 define makehtmldepend
597 $(1): bin/md-to-html5 $(dir $(1))dirdata.yaml
600 # Generate standard dependencies for our known HTML outputs.
605 $(filter %.html,$(MANMASTER_TARGETS)) \
606 $(filter %.html,$(MANPAGES_TARGETS)) \
611 ,$(eval $(call makehtmldepend,$(H))))