This avoids index.html.in and parses index.html.m4 only once.
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
[<a href="`#'news">News</a>]
<hr>
- @README@
+ <p> DESCRIPTION1() </p>
+ <p> DESCRIPTION2() </p>
+ <p> DESCRIPTION3() </p>
<h2> <a name="installation">Installation</a> </h2>