Hi all,

In the past (in the old version of this mailing list) there were several 
threads about make. I kept some of those letters, so here what I got from 
there:
----
Chris <[EMAIL PROTECTED]> wrote then: 
I haven't heard of jmake.  But what about using make itself?  Try
something like this:



SOURCES = Test.java
CLASSES = $(SOURCES:.java=.class)



SUFFIXES: .java .class $(SUFFIXES)



java.class:
@echo "compiling $<"
@javac -classpath $(CLASSPATH) $<



all: Makefile $(CLASSES)
----
Ondrej Popp wrote:
>
> Right, now I understand why java needs let's say
> an equivalent of 'make depend', thanks Cris for explaining this,
> I have found three references to jmake on the web,
>
> a shell script and a perl script at,
> http://www.uoguelph.ca/~soosterh/links/programming.html#jmake
>
> and a java program at,
> http://www.burton-computer.com/download.html
>
> I have not tried them out yet, so I can't tell you more about this
> Have fun
>
> Ondrej
> --
----
And Jonathan added:
There is also a program floating around called "JavaDeps" that will 
supposedly create dependencies for you that can be put into a make file 
(something like that). I never got around to trying it out though. 
Wait...just found the homepage for this program:

http://www.cs.mcgill.ca/~stever/software/JavaDeps/
----

I have just checked all the above links - and they seems still ok.

Hope it helps,

Rani.


On Fri, May 29, 1998 at 01:38:34PM -0400, Paul Reavis wrote:
> Juergen Kreileder wrote:
> 
> > Bernd Kreimeier <[EMAIL PROTECTED]> writes:
> >
> > > It seems that javac recurses through all dependencies
> > > for a given app.java, and creates *.class as needed.
> > > However, it does not seem to check whether the *.java
> > > file is more recent?
> >
> > Yep, javac (with or without -depend) isn't perfect.
> 
> No, but I believe it does this at least. I keep my compiled classfiles
> separate from my source, so a compile dir might look like:
> 
> ~/java/current/
>         source/
>         classes/
> 
> I use the -d option of javac to compile to ~/java/current/classes. My
> classpath looks something like (actually, much more complex, but this is
> gist):
> 
> 
>~/java/current/source:~/java/current/classes:~/java/lib/prebuilt.jar:/usr/local/jdk/lib/classes.zip
> 
> Note that the source directory precedes the classes directory and the
> "prebuilt" jar, which for our example is jarfile containing previously
> compiled classes from the same source tree. This order is important.
> 
> Whenever I compile a class and it depends on others whose .java file in the
> source tree is newer than the compiled stuff (first checking the jar, then
> the classes/ tree), it compiles those too. I don't use the -depend switch,
> but I seem to recall it working as expected under these circumstances.
> 
> These days I'm more interested in package dependencies than per-class -
> sometime soon I'll probably be releasing a JarMakefileGenerator thingie
> that I use to build our full code base (400+ classes, lots of packages).
> It's handy, but needs more generalization to be useful to other folks.
> 
> --
> 
> Paul Reavis                                      [EMAIL PROTECTED]
> Design Lead
> Partner Software, Inc.                        http://www.partnersoft.com
> 
> 
> 
> 

-- 
------------------------------------------------------------------------------
    Rani Pinchuk <[EMAIL PROTECTED]>         Tel:  +32-3-326-79-97
    http://www.kinetica.com/home/pinchuk        
------------------------------------------------------------------------------

Reply via email to