On Wed, 17 Sep 2003, Nicola Ken Barozzi <[EMAIL PROTECTED]> wrote: > Wait, you said that it prints out: > > "Skipped already imported file build.xml" > > This means that the current file is *not* imported twice... how do > you gather that it executes the import once?
ISTR Peter said it would be imported the first time through and running ant -verbose says ,---- | Importing file build.xml from /tmp/build.xml | Skipped already imported file: | /tmp/build.xml `---- which looked to me as if it imported itself and skipped the then imported import task. I added an <echo> to the top and only get that once, so maybe it doesn't import anything at all. > Stefan Bodewig wrote: > >> If A imports B and B imports A, I do consider it a bug in the build >> file. > > It is not. It means that both need each other, not "call" each > other, there is no recursion. If I import class A from B, and B > from A, Java will correctly compile the code, it already takes care > of it too. <import> and Java's import are quite different IMHO. <import> includes the other file completely, so the analogy would rather be the one of C's #include to me (if you leave out the target override issue for a moment). And "including" is recursive to me. gcc's preprocessor will let me circularly include files until I hit a limit and then make the compilation fail - so it doesn't flag it as sort of syntax error, but doesn't silently skip the include either. Thinking about it, it can't as some #define's may have changed in between so including the same file multiple times is valid in a richer pre-processor environment. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]