all: ps html info partial_clean

ps:   asis_ug.ps   asis_rm.ps
html: asis_ug.html asis_rm.html
info: asis_ug.info asis_rm.info

asis_ug.ps asis_rm.ps :
	echo x | tex ${@:%.ps=%.texi}
	texindex ${@:%.ps=%.cp}
	tex ${@:%.ps=%.texi}
	dvips ${@:%.ps=%.dvi} -o $@

asis_ug.html asis_rm.html :
	texi2html -number ${@:%.html=%.texi}

asis_ug.info asis_rm.info :
	makeinfo --force -o $@ ${@:%.info=%.texi}
	makeinfo --force --no-headers --no-split -o ${@:%.info=%.txt} \
		${@:%.info=%.texi}

partial_clean:
	rm -f *.aux *.cp *.cps *.dvi *.fn *.ky *.log *.pg *.toc *.tp *.vr

clean: partial_clean
	rm -rf *.ps *.info* asis_rm.txt asis_ug.txt


asis_ug.ps : asis_ug.texi
asis_rm.ps : asis_rm.texi

asis_ug.html : asis_ug.texi
asis_rm.html : asis_rm.texi

asis_ug.info : asis_ug.texi
asis_rm.info : asis_rm.texi

