bugmake - Bugs: bug #61309, Bad rule evaluation when SHELL...


bug #61309: Bad rule evaluation when SHELL variable contains environment variables

Submitter:  None
Submitted:  Fri 08 Oct 2021 09:59:57 AM UTC
Severity:  3 - Normal Item Group:  Bug
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  4.3 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup

Fri 02 Sep 2022 11:55:20 AM UTC, comment #1: 

Have you tried to prefix SHELL command with `env` ?

SHELL = env FOO=BAR sh

        @echo hello \

It seems to work around the issue :)

nervo <nervo>
Fri 08 Oct 2021 09:59:57 AM UTC, original submission:  

When the SHELL variable contains environment variables, multi-line rules (broken with backslash) are processed line by line.



        @echo hello \

this results in the following erroneous output

hello \
/bin/sh: 2: world: not found

Removing the environment variable from the SHELL variable

SHELL = sh

        @echo hello \

produces the expected output:

hello world

.ONESHELL doesn't seem to help in this case.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #52071:  Makefile added by None (265B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by nervo (Posted a comment)
  • -email is unavailable- added by fpigorsch (make bug)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-10-08 fpigorsch Carbon-Copy- Added -email is unavailable-
    2021-10-08 None Attached File- Added Makefile, #52071

    Back to the top

    Powered by Savane 3.13-04b1.
    Corresponding source code