X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Makefile;h=25cc0ed29e3b5a78143e14e3dce16a72e945d848;hb=2ae602d63f3b0b168455263b57886ab6223e11d2;hp=948b173c889fdd0ecd4197504f0cea945eabdd4a;hpb=e9d7ccbe163f3ea1fabb78120fe8b0ea267f71cf;p=org.ibex.core.git diff --git a/Makefile b/Makefile index 948b173..25cc0ed 100644 --- a/Makefile +++ b/Makefile @@ -24,16 +24,17 @@ gcc := $(gcc_path)/bin/$(target)-g++ $(gcc_flags) gcjh := $(gcc_path)/bin/gcjh ar := $(gcc_path)/$(target)/bin/ar strip := $(gcc_path)/$(target)/bin/strip -jikes := jikes -bootclasspath /System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Classes/classes.jar -extdirs ${JAVA_HOME}/jre/lib -nowarn +jar := $(shell ((type fastjar &>/dev/null) && echo fastjar) || echo jar) +jikes := jikes -extdirs ${JAVA_HOME}/jre/lib -nowarn # platforms -all_platforms := Win32 Linux Java2 Darwin +all_platforms := Win32 Linux Java2 ## Platform-Neutral ########################################################################### ifneq ($(verbose),true) -.SILENT: $(jikes_java_objects) .headers $(gcj_java_objects) $(all_platforms) bin/org/xwt/builtin.xwar +.SILENT: $(jikes_java_objects) .headers $(gcj_java_objects) $(all_platforms) bin/org/xwt/builtin.xwar .bootclasspath silent := --silent endif @@ -41,16 +42,23 @@ compile: $(jikes_java_objects) bin/org/xwt/builtin.xwar all: $(all_platforms) -$(jikes_java_objects): $(jikes_java_sources) +.bootclasspath: + 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 > .bootclasspath + rm GetBootClassPath.* + +$(jikes_java_objects): $(jikes_java_sources) .bootclasspath test "$(JAVA_HOME)"x != x || (echo "you forgot to set your JAVA_HOME environment variable"; false) echo "compiling .java -> .class:" mkdir -p bin - $(jikes) -sourcepath src/ -classpath lib/libgcj-minimal.jar $(jikes_java_sources) -d bin/ + $(jikes) -bootclasspath $(shell cat .bootclasspath) -sourcepath src/ -classpath lib/libgcj-minimal.jar $(jikes_java_sources) -d bin/ echo "compiling .java -> .class: done" bin/org/xwt/builtin.xwar: $(xwar_sources) mkdir -p bin/org/xwt - cd src; fastjar cf ../bin/org/xwt/builtin.xwar $(xwar_sources:src/%=%) + cd src; $(jar) cf ../bin/org/xwt/builtin.xwar $(xwar_sources:src/%=%) clean: rm -rf bin-* bin @@ -58,7 +66,7 @@ clean: find . -name \#\*\# | xargs rm -f update-build: - cvs tag -F xwt-`cat next.build` + cvs tag -F xwt-$(current_build) (echo -n 0000; (echo "10k16o16i"; cat next.build | tr a-z A-Z; echo "1+f") | dc) | tail --bytes=5 > next.build- mv next.build- next.build echo -n "Next build will be " @@ -121,15 +129,6 @@ Linux: platform_link="-L$(gcc-path)/lib -L/usr/X11R6/lib -lX11 -lXext --static" \ platform_java_sources="src/org/xwt/plat/POSIX.java src/org/xwt/plat/X11.java" -Darwin: - echo -e "\\n=== Darwin =========================================" - make gcj \ - platform=Darwin \ - target=powerpc-apple-darwin \ - target_bin=xwt-x11.darwin \ - platform_link="-L$(gcc-path)/lib -L/usr/X11R6/lib -lX11 -lXext --static" \ - platform_java_sources="src/org/xwt/plat/POSIX.java src/org/xwt/plat/X11.java" - Win32: echo -e "\\n=== Win32 =========================================" make gcj \ @@ -144,7 +143,7 @@ Java2: $(jikes_java_objects) bin/org/xwt/builtin.xwar echo "archiving .class -> .jar" mkdir -p bin-Java2 echo -e "Manifest-Version: 1.0\nMain-Class: org.xwt.Main\n" > bin/.manifest - cd bin; fastjar cvf ../bin-Java2/xwt.jar -m .manifest \ + cd bin; $(jar) cvf ../bin-Java2/xwt.jar -m .manifest \ org/xwt/builtin.xwar \ `find . -name \*.class | grep -v org/xwt/plat/` \ org/xwt/plat/AWT*.class org/xwt/plat/Java2*.class | tr \\012 \\015 @@ -160,10 +159,12 @@ PalmOS: ## master.dist.xwt.org ############################################################################ current_build := $(shell cat next.build) +this_branch := $(shell tail -c +2 CVS/Tag 2>/dev/null || echo HEAD) dist: # this will fail if we haven't checked-in since the comment is null; we want this. cvs commit -m '' > /dev/null + cvs tag -F xwt-$(current_build) echo "***********************************************************" echo "* This build is $(current_build)" @@ -175,7 +176,7 @@ dist: tail -n 200 .make-dist.out | \ mail -s "Unsigned binaries of $(current_build) are now available" cvs@xwt.org else - ssh xwt@xwt.org verbose=$(verbose) /home/xwt/dist \ + ssh xwt@xwt.org verbose=$(verbose) /home/xwt/dist $(this_branch) \ | grep -v "make...:.\(Entering\|Leaving\).directory" endif @@ -205,5 +206,10 @@ dist-private: echo "copying xwt.linux to distribution area..." $(strip) bin-Linux/xwt.linux -o /var/www/master.dist.xwt.org/xwt-$(current_build).linux.unsigned + echo "creating source tarball in distribution area..." + CVSROOT=/cvs cvs export -r xwt-$(current_build) xwt + mv xwt xwt-$(current_build) + tar cvzf /var/www/master.dist.xwt.org/xwt-$(current_build).tgz xwt-$(current_build) + echo echo "*** DONE ******************************************"