# Makefile generated by imake - do not edit!
# $Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $

##################### Generic Header ######################################
# $Id: Imake.tmpl,v 1.31 2001/10/10 08:12:21 queinnec Exp queinnec $

# Define commands and other parameters specific to site:

##################### Generic Site Parameters #############################
# $Id: Site.def,v 1.25 2001/04/02 17:04:46 queinnec Exp queinnec $

HOME   		= /archive/home/queinnec
HOST		= perou
HOSTTYPE	= i586
CVSROOT         = /home/cvsowner/cvsd-root/master

LATEX		= latex
BIBTEX		= bibtex
DELATEX		= detex -l
MAKEINDEX	= makeindex
SPELL		= ispell -l
EPELLE		= epelle -latex
PACK		= gzip
UNPACK		= gunzip
RM		= rm -f
CC		= cc
MAKE            = make
DVIPS           = dvips
DVIPSFLAGS	= -D600 -Z
LiSP2TeXFLAGS   = -vU -I/usr/local/lib/LiSP2TeX
RSYNC		= rsync --rsh ssh -z
RDIST		= rdist -P /usr/bin/ssh
RSH		= ssh -A -g -X
HEVEA		= hevea
HEVEAFLAGS	= -v -I ${HOME}/Hevea
HACHA		= hacha
HACHAFLAGS	= -v

TIME		= time
DELATEX         = cat
WAISDATABASES   = /usr/local/lib/freewais-sf/databases
PRINT           = print
FTPHOST		=	localhost

FTPDIR		=	/stuff/WebPublic/queinnec
LATEX2HTMLDIR	=	/usr/lib/latex2html
HEVEAFLAGS	= -v -I ${HOME}/Hevea -I /usr/local/lib/hevea 			-I /usr/local/lib/hevea/html

EXPORTFLAGS	=	-ftp_dir=${FTPDIR}

# The generic rules that hold everywhere. They mainly concern
# concern TeX generation which is a not naive task given the
# circular constraints that exist.
.SUFFIXES: .epelle .spell .ind .idx .pdf .ps .dvi .bbl .aux .tex .bk .hbk

.tex.dvi: ;	${LATEX} $*.tex
.tex.aux: ;	${LATEX} $*.tex
.tex.bbl: ;	-${BIBTEX} $*
.idx.ind: ;	${MAKEINDEX} $*
.tex.spell: ;	${DELATEX} $*.tex | ${SPELL} | sort -u >$*.spell
.tex.epelle:
	DICOPLUS=${HOME}/.dicoplus.z ${EPELLE} $*.tex >$*.epelle

.dvi.ps:
	${DVIPS} ${DVIPSFLAGS} $*.dvi -o $*.ps
.ps.pdf:
	ps2pdf $*.ps $*.pdf

# Default entry for the LiSP2TeX tool
LiSP2TeXFLAGS   = -vU -I/usr/local/lib/LiSP2TeX
.SUFFIXES: .tex .bk
.bk.tex :
	LiSP2TeX ${LiSP2TeXFLAGS} -- $*.bk > $*.tx
	expand < $*.tx > $*.tex && rm $*.tx
.SUFFIXES: .tex .hbk
.hbk.tex :
	LiSP2TeX ${LiSP2TeXFLAGS} -- $*.hbk > $*.tx
	expand < $*.tx > $*.tex && rm $*.tx

# Rules to convert xfig figures.
.SUFFIXES: .tex .ps .eps .xfig .fig .gif
.xfig.ps : ;	fig2dev -L ps $*.xfig > $*.ps
.fig.ps : ;	fig2dev -L ps $*.fig > $*.ps
.xfig.eps : ;	fig2dev -L eps $*.xfig > $*.eps
.fig.eps : ;	fig2dev -L eps $*.fig > $*.eps
.xfig.tex : ;	fig2dev -L latex $*.xfig > $*.tex
.fig.tex : ;	fig2dev -L latex $*.fig > $*.tex
.xfig.gif :
	fig2dev -L gif -t '#ffffff' $*.xfig $*.gf
	giftrans -t '#ffffff' -o $*.gif $*.gf
	rm $*.gf
.fig.gif :
	fig2dev -L gif -t '#ffffff' $*.fig $*.gf
	giftrans -t '#ffffff' -o $*.gif $*.gf
	rm $*.gf

###########################################################################
# $Id: Imake.rules,v 1.35 2000/09/20 12:14:02 queinnec Exp queinnec $

###################### Specific entries ###################################

# $Id: Imakefile,v 1.1 2002/06/20 16:49:52 queinnec Exp queinnec $
# Imakefile pour le TME << notation en masse >>

work :  do.exam

do.exam :
	cd exam/ && m

copy.to.tique :
	cd .. && m copy.to.tique

include tme.mkf

# end of Imakefile

###################### Generic entries ####################################
# The generic entries that must be everywhere;
PROMPT	=	">>>>>>>>>>>>>>>>>"

# This one does nothing
nothing :

# Check-in back all files that are checked-out whether RCS or CVS
ckpt :
	@perl ${HOME}/perl/ckpt.prl .
rec.ckpt : ckpt
	@PWD=`pwd` ; export PWD                                 ; \
	for d in `find . -type d -print`                        ; \
	do ( cd $$d ; echo Checkpointing $$d                        ; \
	${MAKE} -f $$PWD/Makefile ckpt ) ; done

# Sanitize with respect to RCS or CVS (faster than old.notci)
notci sanitize :
	@perl ${HOME}/perl/sanitize.prl .
rec.notci : notci
	@PWD=`pwd` ; export PWD                                 ; \
	for d in `find . -type d -print`                        ; \
	do ( cd $$d ; echo Sanitizing $$d                        ; \
	${MAKE} -f $$PWD/Makefile notci ) ; done

# Erase useless files
clean ::
	-${RM} core *.BAK *~ .*.BAK .*~
rec.clean : clean
	@PWD=`pwd` ; export PWD                                 ; \
	for d in `find . -type d -print`                        ; \
	do ( cd $$d ; echo Cleaning $$d                        ; \
	${MAKE} -f $$PWD/Makefile clean ) ; done

# Erase useless files in a Tex, LaTeX, BibTeX contexts, ChangeBar files
cleantex ::
	-${RM} *.log *.aux *.lof *.lot *.toc
	-${RM} *.blg *.bbl
	-${RM} *.idx *.ilg *.ind
	-${RM} *.spell *.epelle
	-${RM} *.cb
cleandvi ::
	-${RM} *.dvi

# This entry maps a make entry on all subdirectories, the work to be
# done is held in the MAPWORK variable
MAPWORK=clean
mapdirectories ::
	@for d in `ls -F | sed -e '/\/\$$/s,.\$$,,p' -e d` 	; 	do ( cd $$d 						; 	     echo "			on $$d: m ${MAPWORK}" 	; 	     m ${MAKEFLAGS} "${MAPWORK}" ) 			; 	done

# This entry compresses all not yet compressed files of a directory. The
# makefile is not compressed in order to ease the reverse action.
compress ::
	@for f in `ls -AF`					; 	 do case $$f in *[mM]akefile|*/|*.Z) :			;;                         *) echo ${PACK} $$f ; ${PACK} $$f	;;             esac						;          done

# This entry removes the generated Makefile.
# Usually one uses it as                clean :: cleanMakefile
cleanMakefile :
	-@if [ -f Imakefile ] ; then ${RM} -f Makefile ; fi

# This entry depends on FILE, STAMP and DATE
# It changes all occurrences of STAMP...tar into STAMPDATE.tar
# This is used to keep track of files within html pages.

update.file :
	@if [ -z "${FILE}" ] ; then echo Define FILE first ; exit 1 ;		else exit 0 ; fi

	@if [ -z "${STAMP}" ] ; then echo Define STAMP first ; exit 1 ;		else exit 0 ; fi

	@if [ -z "${DATE}" ] ; then echo Define DATE first ; exit 1 ;		else exit 0 ; fi

	@echo
	@echo "	Updating ${FILE} ..."
	@echo
	if [ -f ${FILE}.BAK ]; then exit 0; else 	  mv ${FILE} ${FILE}.BAK ; cp ${FILE}.BAK ${FILE} ; fi

	$$HOME/perl/updatefile.prl -stamp="${STAMP}" -date="${DATE}" -- ${FILE}
	chmod u+w ${FILE}

