[jamming] Problem with SubInclude Rule

Narayanan Balakrishnan narayanan_b at hotmail.com
Wed Feb 12 11:35:19 PST 2003


If the SubInclude rule is called in a Jamfile enclosed in an if (..) 
condition, the following error is generated:

Top level of source tree has not been set with SubDir

Consider the following example:

Dir ~/myroot contains Jamrules

File ~/myroot/Jamfile contains the following entries:
# begin
SubDir ROOT ;
SubInclude ROOT folder1 ;
SubInclude ROOT folder2 ;
# end

File ~/myroot/folder1/Jamfile has the following entries:
# begin
SubDir ROOT folder1 ;
...
# end

File ~/myroot/folder2/Jamfile has the following entries:
# begin
SubDir ROOT folder2 ;
...
# end

Assuming the environment variable XYZ is set, if I modify ~/myroot/Jamfile 
to:
# begin
SubDir ROOT ;
if $(XYZ) = "USEFOLDER1"
{
   SubInclude ROOT folder1 ;
}

SubInclude ROOT folder2 ;
# end

then the error message "Top level of source tree has not been set with 
SubDir" is seen. Is this is a known issue? I am using version 2.0.5 of jam 
on solaris 2.7.

Please help.

Thanks,

Narayanan

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail




More information about the jamming mailing list