help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: how to use a string in a .SHELLFLAGS option?


From: Cook, Malcolm
Subject: RE: how to use a string in a .SHELLFLAGS option?
Date: Tue, 11 Jan 2022 15:56:58 +0000

>On Mon, Jan 10, 2022 at 8:29 AM Cook, Malcolm <mailto:MEC@stowers.org> wrote:
>>
>> >I'd like to use:
>> >
>> >SHELL = /usr/bin/perl
>> >.SHELLFLAGS = -w -E 'use warnings FATAL => "all";' -E
>> >
>> >but it doesn't work, saying at recipe execution time:
>> >
>> >Can't find string terminator "'" anywhere before EOF at -e line 1.
>>
>> Your problem is in the recipe that you don't show.
>>
>> This works perfectly in my hands
>>
>> SHELL = /usr/bin/perl
>> .SHELLFLAGS = -w -E 'use warnings FATAL => "all";' -E
>> all:
>> print 'it works'
>
>It turns out it's a .ONESHELL interaction. Add .ONESHELL: to the top
>of your demo and you get the error. I don't know why.

Hmm.  The interaction is with the multiple `-E` in shellflags.

Try this to good effect:

.ONESHELL:
SHELL = /usr/bin/perl
.SHELLFLAGS = -w -Mwarnings(FATAL=>"all") -E

all:
        print "it works\n";
        print 'as advertised';


>
>Britton
>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]