# Makefile for cln/doc

#### Start of system configuration section. ####

# Directories used by "make":
srcdir = @srcdir@

# Directories used by "make install":
prefix = @prefix@
local_prefix = /usr/local
exec_prefix = $(prefix)
infodir = $(exec_prefix)/info
mandir = $(exec_prefix)/man
dvidir = $(mandir)/dvi

# Programs used by "make":
RM = rm -f
@SET_MAKE@

# Programs used by "make" if you have changed the documentation files:
TEX = tex
TEXI2DVI = texi2dvi
DVIPS = dvips -Pljfour
MAKEINFO = makeinfo
TEXI2HTML = texi2html
EMACS = emacs

# Programs used by "make install":
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

#### End of system configuration section. ####

SHELL = /bin/sh

VPATH = $(srcdir)

all : info dvi ps html


info : $(srcdir)/cln.info

$(srcdir)/cln.info : $(srcdir)/cln.texi
	cd $(srcdir) && $(MAKEINFO) --no-split cln.texi

$(srcdir)/cln.texi : $(srcdir)/cln.tex
	cp $< $@ && \
	$(EMACS) -batch $@ -load addnodes.el -f save-buffer && \
	$(RM) $@~


dvi : $(srcdir)/cln.dvi

$(srcdir)/cln.dvi : $(srcdir)/cln.texi
	cd $(srcdir) && $(TEXI2DVI) cln.texi


ps : $(srcdir)/cln.ps

$(srcdir)/cln.ps : $(srcdir)/cln.dvi
	$(DVIPS) -o $@ $<


html : cln.html cln_toc.html

cln.html : $(srcdir)/cln.texi
	cd $(srcdir) && $(TEXI2HTML) -expandinfo -number -monolithic cln.texi

cln_toc.html : $(srcdir)/cln.texi
	cd $(srcdir) && $(TEXI2HTML) -expandinfo -number -split_chapter cln.texi


install : all force
	if [ ! -d $(infodir) ] ; then mkdir $(infodir) ; fi
	$(INSTALL_DATA) $(srcdir)/cln.info $(infodir)/cln.info
	if [ ! -d $(mandir) ] ; then mkdir $(mandir) ; fi
	if [ ! -d $(dvidir) ] ; then mkdir $(dvidir) ; fi
	$(INSTALL_DATA) $(srcdir)/cln.dvi $(dvidir)/cln.dvi

installdirs : force
	if [ ! -d $(infodir) ] ; then mkdir $(infodir) ; fi
	if [ ! -d $(mandir) ] ; then mkdir $(mandir) ; fi
	if [ ! -d $(dvidir) ] ; then mkdir $(dvidir) ; fi

uninstall : force
	$(RM) $(infodir)/cln.info
	$(RM) $(dvidir)/cln.dvi

check : all

mostlyclean : clean

clean : force
	$(RM) *~ *.aux *.toc *.cp *.fn *.ky *.pg *.pg *.tp *.vr *.my *.log core

distclean : clean
	$(RM) Makefile

maintainer-clean : distclean
	$(RM) *.info *.dvi
	if [ -f cln.tex ] ; then $(RM) cln.texi ; fi

force :

