
.PHONY:
	@echo

default: .PHONY
	@echo " "
	@echo "GAP-Lib (C)1998-1999 Peter Bengtsson"
	@echo " "
	@echo "Target must be one of:"
	@echo " "
	@echo "  examples   - Compile examples (gcc/egcs)."
	@echo "  amigaex    - Compile examples with Amiga SAS/C."
	@echo " "
	@echo "  wizards    - Source wizards (gcc/egcs)."
	@echo " "
	@echo "  check      - Check MD5 checksums for files."
	@echo " "
	
wizards: .PHONY
	gmake -C wizards -f Makefile all

examples: .PHONY
	gmake -C examples -f Makefile all

amigaex: .PHONY
	@execute Amiga.sh examples all

check: .PHONY
	md5sum -c Checksums

#
# Maintainance only.
#

checksums: .PHONY
	@echo "Rebuilding checksums..."
	@delete Checksums\#\?
	@list \#\? all files \>t:check lformat\=\"md5sum \%p\%n\ \>\>Checksums\"
	@echo \>Checksums \"\# MD5 Checksums.\"
	@execute t:check
	pgp -sb Checksums peter
	
docs: .PHONY
	@echo "Rebuilding documentation from autodoc."
	@-delete doc/html/GAP\.html
	@-delete doc/amigaguide/GAP\.guide
	echo >build.tmp "GAP-Lib Function Reference*NGAP.html*N1"
	autodoc2x doc/text/GAP.doc \<build.tmp \>Nil\:
	@rename GAP.html doc/html/ \>Nil\:
	echo >build.tmp "GAP-Lib Function Reference*NGAP.guide*N2"
	autodoc2x doc/text/GAP.doc \<build.tmp \>Nil\:
	@rename GAP.guide doc/amigaguide/ \>Nil\:
	@-delete build.tmp \>Nil\:
