#
# Makefile for cthugha-L
# documentation directory
#
# You should not need to change anything in this file.
# Set your preferences in the file configure.
#

include ../../configure

VERSION = 1.1

all: doc

#
# Documentation
#
doc: ../cthugha.info ../cthugha.ps ../../INSTALL ../cthugha.txt


TEXI_SRC = cthugha.texi overview.texi configure.texi			\
	installation.texi keyboard.texi	contact.texi			\
	other.texi parameters.texi technical.texi config.texi

../cthugha.info: ${TEXI_SRC} ../../configure
	${MAKEINFO} ${MAKEINFO_FLAGS} cthugha.texi -o ../cthugha.info

cthugha.dvi: ${TEXI_SRC} ../../configure
	${TEXI2DVI} ${TEXI2DVI_FLAGS} cthugha.texi

../cthugha.ps: cthugha.dvi ../../configure
	${DVIPS} cthugha.dvi -o ../cthugha.ps

config.texi:  ../../configure
	-@echo "@set VERSION    "${VERSION} > config.texi
	-@echo "@set INSTLIB    "${INST_LIB} >> config.texi


../../INSTALL: ${TEXI_SRC} ../../configure
	$(MAKEINFO) $(MAKEINFO_FLAGS) --no-headers cthugha.texi -o - \
	  | sed -n '/^Installation/,/^Technical Stuff/'p \
	  | sed '$$d' > ../../INSTALL

../cthugha.txt: ${TEXI_SRC} ../../configure
	$(MAKEINFO) $(MAKEINFO_FLAGS) --no-headers cthugha.texi -o ../cthugha.txt



# completely clean up, but keep INSTALL!
dist-clean:
	rm -f cthugha.aux cthugha.cp cthugha.dvi cthugha.fn cthugha.info        \
	      cthugha.ky cthugha.log cthugha.pg ../cthugha.ps cthugha.toc       \
              cthugha.tp cthugha.vr *~ *.bak config.texi			\
	      ../cthugha.ascii

# only remove junk, keep .dvi and .ps
clean:
	rm -f cthugha.aux cthugha.cp cthugha.fn cthugha.ky cthugha.log \
	      cthugha.pg cthugha.toc cthugha.tp cthugha.vr config.texi




