URL:
<https://savannah.gnu.org/bugs/?56064>
Summary: bash + .ONESHELL breaks when .SHELLFLAGS is set
Project: make
Submitted by: carlponder
Submitted on: Wed 03 Apr 2019 12:54:47 AM UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 4.1
Operating System: POSIX-Based
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
Here is a basic usage of shell-sequencing inside a Makefile rule:
SHELL:=/bin/bash
.ONESHELL:
default:
VERSION=1.0
echo '$${VERSION}=' $${VERSION}
When I run "make", it outputs
VERSION=1.0
echo '${VERSION}=' ${VERSION}
${VERSION}= 1.0
indicating that the variable had been set and expanded the way I expect.
If I add any one of these forms to the Makefile
.SHELLFLAGS=-l
.SHELLFLAGS=-e
.SHELLFLAGS=-u
.SHELLFLAGS=-x
.SHELLFLAGS=--noprofile
.SHELLFLAGS=--norc
I get the same error
VERSION=1.0
echo '${VERSION}=' ${VERSION}
/bin/bash: VERSION=1.0
echo '${VERSION}=' ${VERSION}: No such file or directory
Makefile:10: recipe for target 'default' failed
make: *** [default] Error 127
This isn't a blocker to me, but I'm trying to figure out what's wrong.
As far as I can tell from the documentation, my usages are okay.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 03 Apr 2019 12:54:47 AM UTC Name: Makefile Size: 245B By:
carlponder
<http://savannah.gnu.org/bugs/download.php?file_id=46702>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56064>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
_______________________________________________
Bug-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-make