+
+## dist.xwt.org ############################################################################
+
+current_build := $(shell cat next.build)
+
+dist:
+ # this will fail if we haven't checked-in since the comment is null; we want this.
+# cvs commit -m '' > /dev/null
+
+ echo "***********************************************************"
+ echo "* This build is $(current_build)"
+ echo "***********************************************************"
+
+ (test `uname -n` = gosset.megacz.com) || \
+ ssh xwt@xwt.org verbose=$(verbose) /home/xwt/dist \
+ | grep -v "make...:.\(Entering\|Leaving\).directory"
+
+ (test `uname -n` = gosset.megacz.com) && \
+ (((make $(silent) dist-private 2>&1) >> .make-dist.out) || \
+ (tail -n 200 .make-dist.out | mail -s "Build $(current_build) FAILED" cvs@xwt.org; false))
+
+ (test `uname -n` = gosset.megacz.com) && \
+ (tail -n 200 .make-dist.out | \
+ mail -s "Unsigned binaries of $(current_build) are now available" cvs@xwt.org < /dev/null)
+
+dist-private:
+ make $(silent) update-build
+
+ # preserve gcc across builds so we don't have to remake it
+ mv gcc/Makefile Makefile.gcc
+ mkdir -p $(HOME)/dist.xwt.org-gcc
+ rm -rf gcc
+ ln -s $(HOME)/dist.xwt.org-gcc gcc
+ mv Makefile.gcc gcc/Makefile
+
+ # build it
+ nice -n 19 make all
+
+ echo
+ echo === dist.xwt.org ==================================
+
+ echo "copying xwt.jar to distribution area..."
+ cp bin-Java2/xwt.jar /var/www/dist.xwt.org/xwt-$(current_build).jar.unsigned
+
+ echo "copying xwt.exe to distribution area..."
+ cp bin-Win32/xwt.exe /var/www/dist.xwt.org/xwt-$(current_build).exe.unsigned
+
+ echo "copying xwt.linux to distribution area..."
+ cp bin-Linux/xwt.linux /var/www/dist.xwt.org/xwt-$(current_build).linux.unsigned
+
+ echo
+ echo "*** DONE ******************************************"