#!/usr/bin/make -f
# Very small script to byte-compile hyperlatex1.el
# Erick Branderhorst <branderhorst@heel.fgg.eur.nl>

	
BIN	=	$(prefix)/usr/bin
LIB	=	$(prefix)/usr/lib
DOC	=	$(prefix)/usr/doc
TEXMF	=	$(LIB)/texmf
INST_BIN=	install -g root -o root -m 755
INST_DIR=	install -g root -o root -d -m 755
INST_DAT=	install -g root -o root -m 644

%.elc: %.el
	emacs -batch -q -no-site-file -l $< -f hyperlatex-compile

all: hyperlatex1.elc

debian.copyright:
	echo Manual extraction from README

install: hyperlatex ps2gif hyperlatex1.el hyperlatex1.elc README \
debian.makedoc hyperlatex.tex hyperlatex.ind hyperdebian.tex
	$(INST_DIR)			$(BIN)
	$(INST_BIN) hyperlatex		$(BIN)
	$(INST_BIN) ps2gif		$(BIN)
	$(INST_DIR)			$(LIB)
	$(INST_DIR)			$(LIB)/emacs
	$(INST_DIR)			$(LIB)/emacs/site-lisp
	$(INST_DIR)			$(LIB)/emacs/site-lisp/hyperlatex
	$(INST_DAT) hyperlatex.el	$(LIB)/emacs/site-lisp/hyperlatex
	$(INST_DAT) hyperlatex1.el	$(LIB)/emacs/site-lisp/hyperlatex
	$(INST_DAT) hyperlatex1.elc	$(LIB)/emacs/site-lisp/hyperlatex
	$(INST_DIR)			$(DOC)
	$(INST_DAT) README		$(DOC)/hyperlatex
	$(INST_DIR)			$(DOC)/examples
	$(INST_DIR)			$(DOC)/examples/hyperlatex
	$(INST_DAT) debian.makedoc	$(DOC)/examples/hyperlatex/Makefile
	$(INST_DAT) hyperlatex.tex	$(DOC)/examples/hyperlatex
	$(INST_DAT) hyperlatex.ind	$(DOC)/examples/hyperlatex
	$(INST_DAT) *.xbm		$(DOC)/examples/hyperlatex
	$(INST_DAT) hyperdebian.tex	$(DOC)/examples/hyperlatex
	$(INST_DIR)			$(TEXMF)
	$(INST_DIR)			$(TEXMF)/tex
	$(INST_DIR)			$(TEXMF)/tex/misc
	$(INST_DAT) hyperlatex.sty	$(TEXMF)/tex/misc

clean:
	rm -f *.elc *~ ./#* *.log *.dvi



