According to an email I found (http://www.geocrawler.com/archives/3/14603/2002/9/0/9638108/) the correct behavior for <include> is to set the included file's basedir to the basedir of the file including it.
This is not the case. Files should always be included relative to the file doing the including as you say. This is the intention - however there was a small bug in the implementation where the basedir was mistakenly being set to Project.BaseDirectory which will always be the dir of the top-level project - in your case default.build.
I've just committed the a fix. So could you grab the next nightly and try it out.
Ian
This is pretty inconvenient, as the included file cannot include other files relative to it, that is, you cannot create complex libraries, as the library file including other files would have to know its position relative to the file that included it. This is pretty counter-intuitive.
Anyway, even if I go with the fact that the basedir is set in such a way, the output of the above setup is very interesting:
NAnt version 0.8.4.0 Copyright (C) 2001-2003 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///C:/default.build
[echo] Including file included.build
[echo] Master include included.
[echo] Including file task1
[echo] task1 included
[echo] Including file task2
BUILD FAILED
C:\inc\included.build(7,3):
Could not include build file C:\task2.build.
Could not find file "C:\task2.build".
Total time: 0.1 seconds.
The file 'included.build' successfully includes the first file (task1), but fails to include the second one, although they are both specified relative to it.
If you will be fixing this issue, I vote that <include> task keeps it's base relative to the file itself, so that the above described scenario works correctly. For the rest of targets, I guess it is more convenient to inherit the basedir of the including file.
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
