Re: Re[4]: skawares Failt to build if the CFLAGS are not in the same line

From: Sertonix <sertonix_at_posteo.net>
Date: Mon, 24 Mar 2025 18:46:33 +0000

On Mon Mar 24, 2025 at 7:38 PM CET, Laurent Bercot wrote:
>>The issues seem to be that ./configure is setting IFS=' ' without
>>unsetting the value again. This means tabs in CFLAGS also break
>>./configure. And the variables aren't escaped for config.mk.
>
> ... oh. I sent my reply before seeing yours.
>
> This is interesting. But then why does
>
> CFLAGS="-O2
> -pipe"
> ./configure
>
> work? I would expect it to fail if IFS was the issue.
>
>
>>+ IFS=' ' read -r k v ldlibs
>
> bash construct ;)

You sure? Last time I read the posix spec this seemed to be required
to work.

>>+CFLAGS := $CFLAGS ${CFLAGS_POST//'
>>+'/'\
>>+'}
>
> I am unfamiliar with this, can you please explain it?

This is a bash construct! ;)

I used it since it works in busybox ash. This is equivalent to this sed
expression: s/\n/\\\n/g

Essentially prepending a backslash to each newline.

> --
> Laurent
Received on Mon Mar 24 2025 - 19:46:33 CET

This archive was generated by hypermail 2.4.0 : Mon Mar 24 2025 - 19:47:02 CET