2003/09/04 07:16:50
[org.ibex.core.git] / upstream / Makefile
index c6d1e96..46e1101 100644 (file)
@@ -28,15 +28,21 @@ configure_gcc-3.3-mips                  := --enable-languages=c --nfp --with-new
 
 # jikes has a special target to autodetect a pre-installed jikes, and to autodetect the JVM's $CLASSPATH
 .jikes:
-       echo "jikes " > .jikes
-       (type jikes && (jikes --version | grep "Version 1.18")) || \
-               (make jikes-1.18/src jikes-1.18/.installed && echo -n "upstream/install/bin/jikes " > .jikes)
+       echo "#!/bin/sh" > .jikes
+       echo 'for A in `find build/class -name \*.class`; do mv $$A $$A.old; done;' >> .jikes
+       echo -n 'PATH=$$PATH:upstream/install/bin/ jikes -classpath lib/libgcj-minimal.jar $$@ -d build/class/ -sourcepath build/java/ ' >> .jikes
+       (type jikes && (jikes --version | grep "Version 1.18")) || make jikes-1.18/src jikes-1.18/.installed
        echo -n "$(jikes_flags) -bootclasspath " >> .jikes
        echo "public class GetBootClassPath { public static void main(String[] s) { " > GetBootClassPath.java
        echo "System.out.println(System.getProperty(\"sun.boot.class.path\")); } }"  >> GetBootClassPath.java
        javac GetBootClassPath.java
        java -cp . GetBootClassPath >> .jikes
        rm GetBootClassPath.*
+       echo 'EXIT=$$?' >> .jikes
+       echo 'for A in `find build/class -name \*.class`; do test -e $$A.old && cmp -s $$A $$A.old && mv $$A.old $$A; done' >> .jikes
+       echo 'for A in `find build/class -name \*.class`; do test -e $$A.old && rm $$A.old; done' >> .jikes
+       echo 'exit $$EXIT' >> .jikes
+       chmod +x .jikes
 
 # make the package's directory (if it doesn't exist)
 $(packages):
@@ -50,7 +56,7 @@ $(packages):
 $(packages:%=%-$(target)): %-$(target): %
        make $</src $</build-$(target)/.installed target=$(patsubst $<-%,%,$@)
 
-gcc-3.3-mips: binutils-2.13.2.1-mips
+gcc-3.3-$(target): binutils-2.13.2.1-$(target)
 
 # download the source code
 $(packages:%=%/src): %/src: