# Makefile for compiling gcinman.tex
# by Edward G.J. Lee <edt1023@cle.linux.org.tex>
#
# $Id: Makefile,v 1.1.1.1 2007/11/08 14:15:40 edt1023 Exp $

IND     = makeindex
BIB     = bibtex
LTX     = latex
TOPS    = dvips
TOPDF   = ps2pdf
VER     = 1.1
DATE    = `date +%y%m%d`
RM      = rm -f

OBJS    = history.tex install.tex manipulate.tex tune.tex inputtb.tex

EPS     = keyboard.eps

REMOVE  = *.log *.aux *.toc *.lot *.lof *.out *.ilg *.idx *.ind *.dvi \
          *.blg *.bbl *.glg *.glx *.glo *.gls *.mx1 *.bak *.ps *.mpx \
	  *.mpo mpgraph.mp mprun.mp mptrace.tmp  mpxerr.tex tmp.inputs \
	  *.brf *.bmt *.[0-9] $(OBJS)

gcinman.pdf: gcinman.tex $(OBJS) hyperref.cfg $(EPS)
	$(LTX)   gcinman.tex && \
        $(IND)   gcinman.idx && \
	$(LTX)   gcinman.tex && \
	$(LTX)   gcinman.tex && \
	$(TOPS)  gcinman && \
	$(TOPDF) gcinman.ps
#       $(BIB)   gcinman

%.tex: %.otx
	./cjkspace.py -o $@ $<

clean:
	@$(RM) $(REMOVE)

.PHONY: clean
