#
# Makefile for kerberos/doc
#

srcdir = .

MAKEINFO = makeinfo
TEXI2DVI = texi2dvi

TEXI = \
	developer-notes.texinfo \
	install.texinfo \
	kerbapi.texi \
	kerbman.texinfo \
	mac.texi \
	windows.texi

INFO = \
	developer-notes.info \
	install.info \
	kerbapi.info \
	kerbman.info \
	mac.info \
	windows.info

DVI = \
	install.dvi \
	kerbapi.dvi \
	kerbman.dvi \
	mac.dvi \
	windows.dvi

PS = \
	install.ps \
	kerbapi.ps \
	kerbman.ps \
	mac.ps \
	windows.ps

COMMON_TXT = \
	developer-notes.txt \
	kerbapi.txt \
	kerbman.txt

TXT = $(COMMON_TXT) \
	install.txt \
	mac.txt \
	windows.txt

COMMON_HTML = \
	developer-notes.html \
	kerbapi.html \
	kerbman.html

HTML = $(COMMON_HTML) \
	install.html \
	mac.html \
	windows.html

all:

depend:

install:

# this needs INSTALL DESTDIR and INFODIR defined, which they aren't
install-info:
	for i in $(INFO); do \
		$(INSTALL) $$i $(DESTDIR)$(INFODIR)/$$i; done

check:

info: $(INFO)

dvi: $(DVI)

ps: $(PS)

txt: $(TXT)

html: $(HTML)

# The Windows binary release includes the doc as text and HTML.
windoc: $(COMMON_TXT) $(COMMON_HTML) windows.txt windows.html

# The Mac binary release includes the doc as text and HTML also.
macdoc: $(COMMON_TXT) $(COMMON_HTML) mac.txt mac.html

clean-info clean:
	rm -f *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.fns
	rm -f *.dvi *.ps
	rm -f *.info*
	rm -f *.txt
	rm -f *.html

.SUFFIXES: .texinfo .ps .texi .info .dvi .txt .html

.texinfo.info:
	$(MAKEINFO) -o $@ $<

.texi.info:
	$(MAKEINFO) -o $@ $<

.texinfo.dvi:
	$(TEXI2DVI) $<

.texi.dvi:
	$(TEXI2DVI) $<

.dvi.ps:
	dvips -o $*.ps $<

.texi.txt:
	makeinfo --no-headers --no-split -o $@ $<
.texinfo.txt:
	makeinfo --no-headers --no-split -o $@ $<

.texi.html:
	texi2html --nosplit --menu $<
.texinfo.html:
	texi2html --nosplit --menu $<

Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
	$(SHELL) config.status

distclean:: clean
	-rm -f *~ core
	-rm -f Makefile config.status 
