xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Brunsmann <joerg.brunsm...@FernUni-Hagen.de>
Subject Re: Makefile's
Date Thu, 25 Nov 1999 15:17:53 GMT
Dirk-Willem van Gulik wrote:

>         1.      to simply compile everything in one javac statement
>                 which has been CD's to the right output
>                 directory. Regardless of wether all java files need
>                 to be recompiled.
> over
>         2.      compile everhting and use a -o/-d/-xxx output
>                 specifier

I would prefer 2 over 1. If you use javac from the jdk you
want to compile everyting because javac is itself written
in java. Starting a java vm is time consuming for 100 single
source files. Yes, I know jikes ;-)

> over
>         3.      defined dependencies and do it file by file
>                 instead of all, and only when needed
> Is there a good reason ? Are dependencies too hard ? Or do (some)
> compiler's work this out themselfes well enough ?

Cyclic dependencies are hard to model in makefiles. A modern
java compiler resolves these dependencies.

I always have a makefile which lists all class files but no
dependencies. In this makefile I have a target which compiles
all source files from all directories in one compile run. You
then have a consistent set of class files. After that you can 
modify single source files and say 'make' which also compiles 
the modified source files which is faster.

> And secondly, why is there such a strong desire to move the *.class
> file's far away from the source ?

Why do you have a strong desire to let the *.class stay near the
source files?



View raw message