]> git.tue.mpg.de Git - dss.git/commitdiff
index.html: Simplify make rule.
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 8 May 2024 00:00:34 +0000 (02:00 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 2 Jul 2024 16:52:03 +0000 (18:52 +0200)
This avoids index.html.in and parses index.html.m4 only once.

Makefile
index.html.m4

index f06f80c8dcdccea64cfc36ef28314aee8db3b3e4..f462643ad3571b467cf0c30715fbeb62422d74ec 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -159,16 +159,9 @@ endef
 README:
        @printf '%s\n' "$(README)"
 
-index.html.in: index.html.m4
-       $(call SAY, M4 $<)
+index.html: index.html.m4 Makefile NEWS
+       $(call SAY, M4 $@)
        $(M4) $< > $@
-index.html: index.html.in NEWS
-       $(call SAY, MD $@)
-       sed -e '/@README@/,$$d' index.html.in > $@
-       printf '<p> %s </p>\n' "$(DESCRIPTION1)" >> $@
-       printf '<p> %s </p>\n' "$(DESCRIPTION2)" >> $@
-       printf '<p> %s </p>\n' "$(DESCRIPTION3)" >> $@
-       sed -e '1,/@README@/d' -e '/@NEWS@/,$$d' index.html.in >> $@
        markdown NEWS >> $@
 
 -include Makefile.local
index 4b23c81477d71a62a345ad6923bf494166e22dd1..42ec52bc30fcb0ba1278686089e9c31f7e7d8f01 100644 (file)
@@ -26,7 +26,9 @@ dnl SPDX-License-Identifier: GPL-2.0
        [<a href="`#'news">News</a>]
        <hr>
 
-       @README@
+       <p> DESCRIPTION1() </p>
+       <p> DESCRIPTION2() </p>
+       <p> DESCRIPTION3() </p>
 
        <h2> <a name="installation">Installation</a> </h2>