bugmake - Bugs: bug #1733, included variables undefined when...

 
 

bug #1733: included variables undefined when one included makefile depends on another

Submitted by:  Invalid User ID <Invalid User ID>
Submitted on:  Sat 16 Nov 2002 04:00:35 PM UTC  
 
Severity: 1 - WishItem Group: Enhancement
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 3.79.1Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 09 Jan 2004 08:34:51 PM UTC, comment #2:

I had a similar problem, and was able to work around it by putting the include for the dependent files inside an ifdef, like this for your example:

-include include1
ifdef A
-include include2
endif

Haven't had time to check the code, but this apparently tricks make into thinking it has processed all the included makefiles after the first one, so it restarts itself, gets the value of A from include1, realizes it needs to process the code inside the ifdef, and subsequently includes include2. With this structure, there don't appear to be any cases in which A or B end up undefined.

Paul Cannon <paulcannon>
Mon 18 Nov 2002 03:58:42 PM UTC, comment #1:

I'm marking this as an enhancement request. I'm not sure about making this change; first it could be much more inefficient by causing lots of extra fork/exec operations, and this would be an incompatible change.

Also, with the eval function introduced in 3.80 you can put something like $(eval include include1) into the rule to emulate this (although note that you may need bug 1517 fixed (see the patch on that bug report) before you can do this.

But I'm leaving this open for now, while I think about it :).

Paul D. Smith <psmith>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 18 Nov 2002 03:58:42 PM UTCpsmithSeverity3 - Normal=>(Error - Not Found)
  Item GroupBug=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1