bugmake - Bugs: bug #59230, Conditional assigment of a target...

 
 

bug #59230: Conditional assigment of a target specific variable prevents export

Submitter:  Dmitry Goncharov <dgoncharov>
Submitted:  Tue 06 Oct 2020 10:38:50 PM UTC
   
 
Severity:  3 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  None Operating System:  None
Fixed Release:  4.4 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 29 Nov 2020 11:08:20 PM UTC, comment #5: 

I applied this changes, although I used a slightly different solution for one of them.

Thanks!

Paul D. Smith <psmith>
Group administrator
Tue 06 Oct 2020 10:56:51 PM UTC, comment #4: 

The second patch fixes this second issue.

Dmitry Goncharov <dgoncharov>
Tue 06 Oct 2020 10:55:58 PM UTC, comment #3: 

That is assignment of a global variable prevents export of a target specific variable.

Dmitry Goncharov <dgoncharov>
Tue 06 Oct 2020 10:53:05 PM UTC, comment #2: 

However, the following example still fails, even with the attached patch applied.

$ cat makefile
all:; @echo hello=$$hello
hello=sun
dummy: hello?=world

$ hello=moon  make
hello=


Dmitry Goncharov <dgoncharov>
Tue 06 Oct 2020 10:44:11 PM UTC, comment #1: 

The attached patch fixes the issue.

Dmitry Goncharov <dgoncharov>
Tue 06 Oct 2020 10:38:50 PM UTC, original submission:  

I user reported a bug here

https://lists.gnu.org/archive/html/bug-make/2020-10/msg00001.html


Hi,

I just got a build failure in lz4.  I've isolated it and made a minimal test
case, see below.

This is on GNU Guix on a x86_64 machine.

The reason is that apparently one Makefile rule can unwittingly change how
another unrelated rule functions, IF a submake is involved.

To reproduce:

$ cat Makefile

all:
        $(MAKE) -C foo all

dummy: CFLAGS ?= bar
dummy:

$ cat foo/Makefile

CFLAGS ?= internal

all:
        echo $(CFLAGS)

Expected behavior:

$ CFLAGS=ok make
make -C foo all
make[1]: Entering directory 'foo'
echo ok
ok
make[1]: Leaving directory 'foo'

Actual behavior:

$ CFLAGS=ok make
make -C foo all
make[1]: Entering directory 'foo'
echo internal
internal
make[1]: Leaving directory 'foo'

BR,
   Danny Milosavljevic

Dmitry Goncharov <dgoncharov>

 

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

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by dgoncharov (Submitted the item)
  •  

    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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-29 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.4
    2020-10-06 dgoncharov Attached File- Added sv59230_assignment_of_a_global_variable_prevents_export_of_a_target_specific_variable.diff, #49931
    2020-10-06 dgoncharov Attached File- Added sv59230_conditional_assignment_of_a_target_var, #49930

    Back to the top

    Powered by Savane 3.14-8aba.
    Corresponding source code