all1 = top.s chez-support.s data-structures.s mgu.s check-exp.s
all2 = defining-forms.s type-constructors.s globals.s
all3 = scanner.s ll-parsers.s grammars.s Makefile README NEWS
#all4 = mit-scheme/README mit-scheme/Patchfile mit-scheme/mit-support.s
all4 = mit-scheme/*
all = $(all1) $(all2) $(all3) $(all4)

examples = sem2.s decls-example.s

imprint:
	imprint -Pimagen -2 -O $(all)

doc:
	tex doc.tex
	iptex doc.dvi

wc:
	wc $(all)

archive:
	ar ruv arch $(all) *.tex $(examples)
	split arch arch.

shar:
	shar -pX -cv $(all1) > shar.1
	shar -pX -cv $(all2) > shar.2
	shar -pX -cv $(all3) > shar.3
	shar -pX -cv *.tex > shar.4
	shar -pX -cv $(all5) $(examples) > shar.5

ftp:	$(all) $(examples)
	tar cf - $(all) *.tex $(examples) | compress -v > sps.tar.Z
	cp README sps.tar.Z /net/ftp/pub/wand/sps

extract:
	mv data-structures data-structures.s
	mv defining-forms. defining-forms.s
	mv type-constructo type-constructors.s


