VERSION		= 0.2

# where are your utilities ?
INSTALL		= /usr/bin/installbsd -c   # for AIX
#INSTALL	= /usr/bin/install         # BSD'ish
PATCH		= /usr/local/bin/patch
CP		= /usr/bin/cp
CHMOD		= /usr/bin/chmod
RM		= /usr/bin/rm

# the working directories
# TEXLIBDIR is the directory where dinbrief.sty
# resides. 
# LIBDIR contains all the configuration stuff
# for mgetty+sendfax. 
# BINDIR contains the two external shellscripts 
LIBDIR		= /usr/local/etc/mgetty+sendfax
TEXLIBDIR 	= /usr/local/tex/inputs/latex
BINDIR		= /usr/local/bin


#### end of configurable options ###

install:
	$(INSTALL) -m 755 tex-send-fax-preview $(BINDIR)
	$(INSTALL) -m 755 tex-send-fax-print $(BINDIR)
	$(INSTALL) -m 644 fax-hdrpage.ps $(LIBDIR)
	$(INSTALL) -m 644 tex-send-fax.el $(LIBDIR)
	$(INSTALL) -m 644 tex-mode-hook.el $(LIBDIR)
	$(CP) -f $(TEXLIBDIR)/dinbrief.sty .
	$(CP) dinbrief.sty fax.sty
	$(PATCH) -p0 < dinbrief.patch
	$(INSTALL) -m 644 fax.sty $(TEXLIBDIR)
	$(RM) -f dinbrief.sty fax.sty*
	@echo ""
	@echo "Don't forget to modify your .emacs"	
	@echo ""
	
	
package:
	(cd ..; tar cvf - tex-send-fax | gzip -9 > tsfax-$(VERSION).tgz)

clean:
	$(RM) -f *.dvi *.log *~ gert.ps 