The manual states that files that are included are relative to the file 
containing the include directive.  One might expect that same principle to 
apply to Tuprules.tup but it does not appear to apply.  Given a project 
containing a source directory src, subdirectories such as src/A/B/C, and a 
variant directory var, one would expect to find a Tuprules.tup file in the 
root of the project (in the parent of src and var).  Now if there is a 
common tup file in src/tup/common.tup, the Tupfile in src/A/B/C might 
include it with "include src/tup/common.tup".

The problem arises when there is a Tuprules.tup file in src/A or src/A/B.  
When the Tupfile in src/A/B/C includes src/tup/common.tup, the 
include_rules directive in src/tup/common.tup should look for Tuprules.tup 
files in all intervening directories such as src, src/A, src/A/B, and 
src/A/B/C.  According to the manual It is indeterminate whether it should 
also check the directories about src/tup/common.tup, but I opine that it 
should not.

The problem is that it does not perform the checks above the including 
file, but does perform the checks above the included file.

It appears to me that this is a bug.  The include_rules search should use 
the directory context of the include directive.  But as of 0.7.1-7-g99f3c3c 
it does not.

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to