bugmake - Bugs: bug #25578, target without target specific...

 
 

bug #25578: target without target specific variable setting receives setting from unrelated target

Submitter:  None
Submitted:  Fri 13 Feb 2009 02:15:37 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.81 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 19 Feb 2009 08:38:05 PM UTC, comment #2: 

Hm.  The markup seems to have swallowed my "should be" section.  Also, the email seems to have deleted ALL the backslashes.  Anyway, you get the idea.

Paul D. Smith <psmith>
Group administrator
Thu 19 Feb 2009 07:45:38 PM UTC, comment #1: 

The problem is you forgot a backslash in the programs/retriever/rules.mk file, so the variable assignment is not attached to the target but is rather just a normal assignment.


lib/libOPSCarchretrhook.$(SL):
    LINK_LIBS:=\
       OPSCcomm \
       OPSCbase \
       errors


Should be:


    LINK_LIBS:=\
       OPSCcomm \
       OPSCbase \
       errors


You can find out where variables were assigned very easily by running make with the "-p" option; this will print the entire database make used, and the filename/linenumber where each was defined in the makefile.

Paul D. Smith <psmith>
Group administrator
Fri 13 Feb 2009 02:15:37 PM UTC, original submission:  

HaloO,

with the attached Makefile and its tree of included files
I have the effect that the target testvar in the Makefile
receives the setting of LINK_LIBS from the target
lib/libOPSCarchretrhook.$(SL) in programs/retriever/rules.mk.
I expect it to be empty instead.

The how to repeat is by issuing 'make testvar' from the
top of the provided tree. This happens with make version
3.80 and 3.81 from RedHat Enterprise Linux versions 4 and
5 respectively.

I wasn't able to reproduce the problem in a simple setting.

Regards, TSa.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #17444:  makebug.tar added by None (210KiB - application/x-tar)

 

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)
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2009-02-19 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed
    2009-02-13 None Attached File- Added makebug.tar, #17444

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code