prefix = @prefix@
docdir = $(prefix)/doc/GtkAda/gtkada_ug

MKDIR = mkdir -p
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@

all: gtkada_ug.texi
	echo x | tex gtkada_ug.texi
	texindex gtkada_ug.cp
	tex gtkada_ug.texi
	tex gtkada_ug.texi
	dvips gtkada_ug.dvi -o gtkada_ug.ps
	perl ../texi2html -menu -monolithic gtkada_ug.texi
	makeinfo --force -o gtkada_ug.info gtkada_ug.texi
	makeinfo --force --no-headers --no-split -o gtkada_ug.txt gtkada_ug.texi
	-$(RM) *.aux *.cp *.cps *.dvi *.fn *.ky *.log *.pg *.toc *.tp *.vr

install:
	-$(MKDIR) $(docdir)
	for i in `ls *.html *.info* *.ps *.texi *.txt *.tex *.gif *.jpg`; \
	do \
	   $(INSTALL_DATA) $$i $(docdir); \
	done

clean:
	-$(RM) *.aux *.cp *.cps *.dvi *.fn *.ky *.log *.pg *.toc *.tp *.vr
	-$(RM) gtkada_ug.html gtkada_ug.info* gtkada_ug.ps gtkada_ug.txt

distclean:
	-$(RM) Makefile
