On Tue, 22 Sep 1998 [EMAIL PROTECTED] wrote:

> > CP = $(ROOT):$$CLASSPATH
> > COMPILER = jikes
> > VM = java
> > COPTIONS = -g -deprecation -depend -d $(ROOT)/classes
> > ROPTIONS = -Daxiomroot=$(ROOT)
> > 
> > [a listing of java files here]
> > 
> > %.class: %.java
> >         cd $(@D); $(COMPILER) $(COPTIONS) -classpath $(CP) $(<F)
> > 

If your classes are in a different directory the pattern rule must
have the target found there:

$(ROOT)/classes/%.class : %.java
        .....

I use this same type of method and it works fine.  I assume you are
using GNU make, because I think it is necessary for 'pattern rules'
(vs. the traditional .SUFFIX rules)

> > run: $(CLASSES)
> >         $(VM) $(ROPTIONS) -classpath $(CP) axiomsl.PMRunner
> > 
> > 
> > 
> > Any ideas?
> > -A.
> 
> Worst still with packaged java source files. However the following
> extracts works fo Xsql and me.
> 
> # Makefile
> 
> PROGRAMS = test
> 
> JCLSS1 = \
>    xenon/util/ApplicationResources.class  \
>    test.class
> 
> JSRCS1 = \
>    xenon/util/ApplicationResources.java \
>    test.java
> 
> 
> # Set up Java compiler and flags
> JAVAC = javac
> JAVAC_FLAGS = -deprecation -g
> 
> # Add the suffixes
> .SUFFIXES: .class .java
> 
> 
> #
> # Rule to compile `java' files
> #
> .java.class:
>         $(JAVAC) $(JAVAC_FLAGS) $<
> 
> all:: $(PROGRAMS)
>  
> # This should rebuild all java classes from source
> test:: $(JCLSS1)
> 
> # Run a shell program to generate launcher script
> test::
>       make-javaruntime-stub  test
> 
> ...
> 
> 
> The command `make all' or `make test' should now work for you.
> 
> 
> 
> 
> Cheers
> 
> Peter
> 
> --
> import java.std.disclaimer.*;         // "Dontcha just love the API, baby bop!"
> Peter Pilgrim      Dept:OTC Derivatives IT, 
> Deutsche Bank (UK) Ltd, Groundfloor 133 Houndsditch, London, EC3A 7DX
> Tel: +44-545-8000  Direct: +44 (0)171-545-9977  Fax: 0171-545-4313
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> 

. -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- .
Travis Shirk                          | What does friend mean to you? 
[EMAIL PROTECTED]                      | A word so wrongfully abused
http://www.pobox.com/~travis          | Are you like me, confused
finger [EMAIL PROTECTED] for PGP key   | All included but you...alone
                                              -- Alice In Chains

Reply via email to