make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Trying to get java to build under make


From: John Osen
Subject: Fwd: Trying to get java to build under make
Date: Sat, 31 Jan 2004 12:09:22 -0600


Date: Sat, 31 Jan 2004 12:03:04 -0600
To: address@hidden
From: John Osen <address@hidden>
Subject: Trying to get java to build under make

I am having trouble getting a java file to compile under gnu make, which I just downloaded from CygWin. Here is what I get running from the DOS shell:

C:\bin\lejos\examples\hworld>javac -verbose -target 1.1 -bootclasspath C:/bin/lejos/lib/classes.jar;C:/bin/lejos/lib/rcxrcxcomm.jar;.;C:\bin\lejos/lib/classes.jar;C:\bin\lejos/lib/pcrcxcomm.jar HelloWorld.java
[parsing started HelloWorld.java]
[parsing completed 62ms]
[loading C:\bin\lejos\lib\classes.jar(java/lang/Object.class)]
[loading C:\bin\lejos\lib\classes.jar(java/lang/String.class)]
[loading C:\bin\lejos\lib\classes.jar(java/lang/Exception.class)]
[checking HelloWorld]
[loading C:\bin\lejos\lib\classes.jar(java/lang/Throwable.class)]
[loading C:\bin\lejos\lib\classes.jar(josx/platform/rcx/LCD.class)]
[loading C:\bin\lejos\lib\classes.jar(josx/platform/rcx/TextLCD.class)]
[loading C:\bin\lejos\lib\classes.jar(java/lang/Thread.class)]
[loading C:\bin\lejos\lib\classes.jar(java/lang/Error.class)]
[loading C:\bin\lejos\lib\classes.jar(java/lang/InterruptedException.class)]
[loading C:\bin\lejos\lib\classes.jar(java/lang/RuntimeException.class)]
[wrote HelloWorld.class]
[total 156ms]

Here is what I get out of make:
C:\bin\lejos\examples\hworld>make HelloWorld.class
makefile:53: warning: overriding commands for target `HelloWorld.class'
makefile:50: warning: ignoring old commands for target `HelloWorld.class'
javac -verbose -target 1.1 -bootclasspath C:/bin/lejos/lib/classes.jar;C:/bin/lejos/lib/rcxrcxcomm.jar;.;C:/bin/lejos/lib/classes.jar;C:/bin/lejos/lib/pcrcxcomm.jar HelloWorld.java
[total 31ms]
PK??: not found
-s`-: not found
META-INF/PK??: not found
PK??: not found
-s`-?1U?--¶META-INF/MANIFEST.MFManifest-Version:: not found
-Version:: not found
Created-By:: not found
PK??: not found
C:/bin/lejos/lib/rcxrcxcomm.jar: 11: Syntax error: ")" unexpected
PK??: not found
*s`-: not found
META-INF/PK??: not found
PK??: not found
*s`-?1U?--¶META-INF/MANIFEST.MFManifest-Version:: not found
-Version:: not found
Created-By:: not found
PK??: not found
C:/bin/lejos/lib/classes.jar: 11: Syntax error: "(" unexpected
PK??: not found
,s`-: not found
META-INF/PK??: not found
PK??: not found
,s`-?1U?--¶META-INF/MANIFEST.MFManifest-Version:: not found
-Version:: not found
Created-By:: not found
PK??: not found
C:/bin/lejos/lib/pcrcxcomm.jar: 11: Syntax error: ")" unexpected
make: *** [HelloWorld.class] Error 2

It seems to me that make is playing with '\' versus '/'.

Thanks for your time.

John


Here is my makefile:
LEJOSHOME = C:/bin/lejos

LEJOSC = $(LEJOSHOME)/bin/lejosc
LEJOS = $(LEJOSHOME)/bin/lejos
EMULEJOS = $(LEJOSHOME)/bin/emu-lejos
LEJOSRUN = $(LEJOSHOME)/bin/lejosrun
EMULEJOSRUN = $(LEJOSHOME)/bin/emu-lejosrun
LEJOSFIRMDL = $(LEJOSHOME)/bin/lejosfirmdl

CLASSPATH = .;$(LEJOSHOME)/lib/classes.jar;$(LEJOSHOME)/lib/pcrcxcomm.jar

CLASSLIB = $(LEJOSHOME)/lib/classes.jar

SOURCES = HelloWorld.java
OBJECTS = HelloWorld.class
PROGRAMS = HelloWorld
BINARY = HelloWorld.bin
EMUBINARY = HelloWorld.emu
SIGNATURE = HelloWorld.sig

.EXPORT_ALL_VARIABLES :

.PHONY : run

default : build

build : $(OBJECTS)
        java -Dtinyvm.home=$(LEJOSHOME) \
             -Dtinyvm.write.order=BE \
             -Dtinyvm.loader=lejosrun js.tinyvm.TinyVM \
-classpath $(LEJOSHOME)/lib/classes.jar;$(LEJOSHOME)/lib/rcxrcxcomm.jar;$(CLASSPATH) \
             $(OBJECTS)

run : $(BINARY)
        $(LEJOSRUN) $(BINARY)

emulate : $(EMUBINARY)
        $(EMULEJOSRUN) $(EMUBINARY)

firmdl :
        $(LEJOSFIRMDL)

$(BINARY) : $(OBJECTS)
        $(LEJOS) -verbose $(PROGRAMS) -o $(BINARY) > $(SIGNATURE)

$(EMUBINARY) : $(OBJECTS)
        $(EMULEJOS) $(PROGRAMS) -o $(EMUBINARY)

$(OBJECTS) : $(SOURCES) $(CLASSLIB)
        $(LEJOSC) $(SOURCES)

HelloWorld.class : HelloWorld.java
        which javac
javac -verbose -target 1.1 -bootclasspath $(LEJOSHOME)/lib/classes.jar;$(LEJOSHOME)/lib/rcxrcxcomm.jar;$(CLASSPATH) HelloWorld.java # javac -target 1.1 -bootclasspath $(LEJOS_HOME)\lib\classes.jar;$(LEJOS_HOME)\lib\rcxrcxcomm.jar;$(CLASSPATH) HelloWorld.java
#       lejosjc HelloWorld.java


clean :
        rm -f $(BINARY) $(SIGNATURE) *.class *~ core








reply via email to

[Prev in Thread] Current Thread [Next in Thread]