From 8560e29e73bd4d9fa99053ede58be16c29c36c76 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 8 May 2024 02:00:34 +0200 Subject: [PATCH] index.html: Simplify make rule. This avoids index.html.in and parses index.html.m4 only once. --- Makefile | 11 ++--------- index.html.m4 | 4 +++- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index f06f80c..f462643 100644 --- 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 '

%s

\n' "$(DESCRIPTION1)" >> $@ - printf '

%s

\n' "$(DESCRIPTION2)" >> $@ - printf '

%s

\n' "$(DESCRIPTION3)" >> $@ - sed -e '1,/@README@/d' -e '/@NEWS@/,$$d' index.html.in >> $@ markdown NEWS >> $@ -include Makefile.local diff --git a/index.html.m4 b/index.html.m4 index 4b23c81..42ec52b 100644 --- a/index.html.m4 +++ b/index.html.m4 @@ -26,7 +26,9 @@ dnl SPDX-License-Identifier: GPL-2.0 [News]
- @README@ +

DESCRIPTION1()

+

DESCRIPTION2()

+

DESCRIPTION3()

Installation

-- 2.39.5