# This makefile automates generates the CGI demo programs and
# compressed files.

all:
	gnatmake demo.adb
	gnatmake minimal.adb
	gnatmake search.adb

distribute:
	cp cgi.html cgi-doc.htm
	weblint -e bad-link -e upper-case -e mailto-link -x netscape *.html
	chmod ugo+r [a-z]*
	rm -f cgi.zip cgi.tar.gz
	zip -9 cgi.zip readme *.html *.htm *.ads *.adb makefile
	tar cvf - readme *.html *.htm *.ads *.adb makefile > cgi.tar
	gzip --best cgi.tar
	uuencode cgi.tar.gz cgi.tar.gz > cgi.tar.gz.uu
	uuencode cgi.zip cgi.zip > cgi.zip.uu
	more readme *.html *.htm *.ads *.adb makefile > cgi.email
	chmod ugo+r [a-z]*
	cp cgi.zip readme *.html *.htm *.ads *.adb makefile /public/wheeler/cgi
	chmod a+r /public/wheeler/cgi/*
