File 6061-Fix-release_docs-for-GNU-make-4.3.patch of Package erlang

From 135e3942bc31474bef2dbadb3527882634fc3b3d Mon Sep 17 00:00:00 2001
From: Dmitri Vereshchagin <dmitri.vereshchagin@gmail.com>
Date: Wed, 15 Feb 2023 23:46:07 +0300
Subject: [PATCH] Fix release_docs for GNU make 4.3

Currently release_man_spec for system/doc/top fails on GNU make 4.3

    make[3]: Entering directory '/home/dav/.kerl/builds/26.0-rc1-master/otp_src_git/system/doc/top'
    make[3]: *** No rule to make target '/home/dav/erlang/26.0-rc1-master/doc/docbuild\', needed by 'release_man_spec'.  Stop.

Due to breaking change done in GNU make sp variable is empty in qs
and sq calls (note a '\' after 'docbuild').

Previously appending using '+=' to an empty variable would result
in a value starting with a space.  Since 4.3 the initial space is only
added if the variable already contains some value.

<https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html>
---
 system/doc/top/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/system/doc/top/Makefile b/system/doc/top/Makefile
index 4ada828680..fd4b4cd616 100644
--- a/system/doc/top/Makefile
+++ b/system/doc/top/Makefile
@@ -102,9 +102,7 @@ PDFREFDIR= pdf
 TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
 TOPDOC=true
 
-sp :=
-
-sp +=
+sp := $(subst ,, )
 
 ## qs translates ' ' to '\ ', sq translates '\ ' to ' '
 ## These function are used when the make target is a path that can
-- 
2.35.3

openSUSE Build Service is sponsored by