Remove redundancy: generate docs/manpages.html from template
authorRichard Levitte <levitte@openssl.org>
Sun, 24 Feb 2019 22:13:23 +0000 (23:13 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 28 Feb 2019 14:42:17 +0000 (15:42 +0100)
Change Makefile accordingly

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/web/pull/120)

Makefile
docs/manpages.html.tt [moved from docs/manpages.html with 78% similarity]

index 4549afed00805371b444012e664b23baf0957d08..3a7cd38a0b8b815aaa0e10aef4c521f7c3a458f2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,7 @@ SIMPLE = newsflash.inc sitemap.txt \
         docs/faq.inc docs/fips.inc \
         docs/OpenSSLStrategicArchitecture.html \
         docs/OpenSSL300Design.html \
+        docs/manpages.html \
          news/changelog.html \
         $(foreach S,$(SERIES),news/openssl-$(S)-notes.inc) \
         $(foreach S,$(SERIES),news/openssl-$(S)-notes.html) \
@@ -99,6 +100,9 @@ manpages: $(foreach S,$(NEWMANSERIES),manpages-$(S)) \
 mancross:
        ./bin/mk-mancross master $(SERIES)
 
+docs/manpages.html: docs/manpages.html.tt
+       @rm -f $@
+       ./bin/from-tt releases='master $(SERIES)' docs/manpages.html.tt
 
 ## $(SIMPLE) -- SIMPLE GENERATED FILES
 .PHONY: sitemap community/committers.inc community/omc.inc community/omc-alumni.inc
similarity index 78%
rename from docs/manpages.html
rename to docs/manpages.html.tt
index d75fec045e15b5a2d03223066de8416b335a234b..28defc3bcbc0f58ceb88b3faf059428c671a3649 100644 (file)
             The manual pages for all releases are available online:
            </p>
             <ul>
-              <li><a href="manmaster">master</a></li>
-              <li><a href="man1.1.1">1.1.1</a></li>
-              <li><a href="man1.1.0">1.1.0</a></li>
-              <li><a href="man1.0.2">1.0.2</a></li>
+[% FOREACH release IN releases.split('\s+') -%]
+              <li><a href="man[% release %]">[% release %]</a></li>
+[% END -%]
             </ul>
          </div>
          <footer>