change RECIPEPREFIX to space work only with simple expansion

"lijh.8" via Users list for the GNU implementation of make <[email protected]> Sun, 20 Apr 2025 21:41:47 +0800
Newsgroups gmane.comp.gnu.make.general
Message-ID <[email protected]>
Hi community,


I tried to change RECIPEPREFIX to space.&nbsp;
It works with simple variable expansion but not recursive expansion,
as shown in the first three assignments to it.
I ever thought that the simple expansion gurantees that it happens&nbsp;
before enter recipe.


But in the manual 6.14, it presents an example with greater than sign ` &gt; `,&nbsp;
and it works with both simple and recursive expansion.


Thanks




```


null =
# .RECIPEPREFIX := $(null) # this comment keeps the space
# .RECIPEPREFIX := $' '
.RECIPEPREFIX := $(subst ,, )
# .RECIPEPREFIX = &gt;
# .RECIPEPREFIX := &gt;


all: a b c


a:
	@echo "a:" # tab indent


b:
&nbsp;@echo "b:" # space indent


c:
&gt; @echo "c:"


```