# This makefile is used to create .tgz and .zip versions
# of the VSPL distribution.

PUB = /homes/mr/public_html

# Public HTML directory if not mountable on this machine
# and the shared drive is called E: (/dose on Linux).
# Remember to call ssh-add before calling make sshpub.
SSHPUB = mr10@ely.cl.cam.ac.uk:public_html

help:
	@echo
	@echo "make all      Construct the files: vspl.tgz and vspl.zip"
	@echo "make dose     Put them in my E drive (/dose)"
	@echo "make sshpube  Put them in /dose and my home page using scp"
	@echo

all:	
	rm -f *~ */*~
	echo >TGZDATE
	date >>TGZDATE
	cp doc/README .
	rm -f FILES
	(cd bcpl; make clean)
	(cd c; make clean)
	(cd cpp; make clean)
	(cd yacc; make clean)
	(cd java; make clean)
	(cd javaflat; make clean)
	(cd mcpl; make clean)
	(cd ..; tar cvzf vspl.tgz VSPL)
	rm -f ../vspl.zip
	(cd ..; zip -rv9 vspl.zip VSPL)
	cp TGZDATE FILES
	ls -l ../vspl.tgz ../vspl.zip>>FILES

sshpube:	dose
	scp README FILES ../vspl.tgz ../vspl.zip $(SSHPUB)/VSPL
	cat FILES

dose:	all
	cp ../vspl.tgz ../vspl.zip /dose

