+
+## dist.xwt.org ############################################################################
+
+current_build := $(shell cat next.build)
+
+nohup-dist:
+ rm .make-dist.out
+ touch .make-dist.out
+ nice -n 19 nohup make dist & \
+ tail -f .make-dist.out | grep -v "make...:.\(Entering\|Leaving\).directory"
+
+dist:
+ test `uname -n` = gosset.megacz.com || \
+ (echo -e "um, dist is only intended for use on xwt.org...\nedit the Makefile if you really know what you're doing."; false)
+ echo "***********************************************************"
+ echo "* This build is $(current_build)"
+ echo "***********************************************************"
+
+ make $(silent) update-build
+ (make $(silent) dist-private &> .make-dist.out) || \
+ (cat .make-dist.out | mail -s "Build $(current_build) FAILED" cvs@xwt.org; false)
+ cat .make-dist.out | \
+ mail -s "Unsigned binaries of build $(current_build) are now available" cvs@xwt.org < /dev/null
+
+dist-private:
+ # 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 ******************************************"