bug-make
[Top][All Lists]
Advanced

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

[bug #56064] bash + .ONESHELL breaks when .SHELLFLAGS is set


From: Carl Ponder
Subject: [bug #56064] bash + .ONESHELL breaks when .SHELLFLAGS is set
Date: Tue, 2 Apr 2019 20:54:49 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

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/




reply via email to

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