At 12:03 29/9/00 +0200, you wrote:
>Stefan Bodewig wrote:
>>
>> Nothing strange at all. B depends on A so javac compiles it as
>> well. Just try javac B.java BB.java on the command line, it will
>> compile A as well.
>
>It is it is a major difference
>between
>
>javac -classpath . B.java BB.java
>
>which compiles, and
>
>javac B.java BB.java
>B.java:3: Superclass A of class B not found.
>class B extends A {}
> ^
>1 error
>
>----------------------------------------------
>which fails.
yep but it is not classpath we set but the srcpath.
>I dont know if Im wrong or right, but
>if I have excluded files from compilation I expect them to not
>come along for free.
Impossible to do without rewriting the compiler or alternatively making it
untuitive for other cases.
>I expect the behaviour of the 2nd example above.
>
>To me, it feels like you cant control the include/exclude thing, if
>files
>that are not included or even EXPLICITLY excluded get compiled
>automatically.
anything in srcpath is compiled on demand as thats the way compilers work.
>Now if Im wrong:
>shouldnt ant output that it compiles 3 files?
impossible to do ;(
>The printout says
>Compiling 2 source files to /home/petern/java/anttests/inc-exc
>
>If it is not possible to get ant to output the number of files
>actually compiled, maybe the output should be something like:
>
>Found 2 source files for compilation
good idea.
>I think it would be a good Idea to have the -debug option
>print out all files actually compiled AND written to disk,
Not possible unless underlying compiler offers such functionality.
Cheers,
Pete
*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power." |
| -Abraham Lincoln |
*------------------------------------------------------*