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

2020-11-29 Thread Paul D. Smith
Update of bug #59230 (project make):

  Status:None => Fixed  
 Assigned to:None => psmith 
 Open/Closed:Open => Closed 
   Fixed Release:None => SCM

___

Follow-up Comment #5:

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

Thanks!

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




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

2020-10-07 Thread Dmitry Goncharov
URL:
  

 Summary: Conditional assigment of a target specific variable
prevents export
 Project: make
Submitted by: dgoncharov
Submitted on: Tue 06 Oct 2020 10:38:50 PM UTC
Severity: 3 - Normal
  Item Group: None
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
   Component Version: None
Operating System: None
   Fixed Release: None
   Triage Status: None

___

Details:

I user reported a bug here

https://lists.gnu.org/archive/html/bug-make/2020-10/msg1.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




___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




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

2020-10-07 Thread Dmitry Goncharov
Follow-up Comment #3, bug #59230 (project make):

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

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




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

2020-10-07 Thread Dmitry Goncharov
Additional Item Attachment, bug #59230 (project make):

File name:
sv59230_assignment_of_a_global_variable_prevents_export_of_a_target_specific_variable.diff
Size:1 KB
   




___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




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

2020-10-07 Thread Dmitry Goncharov
Follow-up Comment #4, bug #59230 (project make):

The second patch fixes this second issue.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




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

2020-10-07 Thread Dmitry Goncharov
Follow-up Comment #1, bug #59230 (project make):

The attached patch fixes the issue.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




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

2020-10-07 Thread Dmitry Goncharov
Follow-up Comment #2, bug #59230 (project make):

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=



___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




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

2020-10-07 Thread Dmitry Goncharov
Additional Item Attachment, bug #59230 (project make):

File name: sv59230_conditional_assignment_of_a_target_var Size:1 KB
   




___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/